Skip to content

Commit

Permalink
Revert "Support single literals in tiny url (flyteorg#1654)"
Browse files Browse the repository at this point in the history
This reverts commit e9a714b.
  • Loading branch information
ArthurBook committed Jun 12, 2023
1 parent 595183d commit 75ea89b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ flask==2.2.3
# via mlflow
flatbuffers==23.1.21
# via tensorflow
flyteidl==1.5.6
flyteidl==1.5.4
# via flytekit
fonttools==4.38.0
# via matplotlib
Expand Down
11 changes: 2 additions & 9 deletions flytekit/remote/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,7 @@ def file_access(self) -> FileAccessProvider:

def get(
self, flyte_uri: typing.Optional[str] = None
) -> typing.Optional[typing.Union[LiteralsResolver, Literal, HTML, bytes]]:
"""
General function that works with flyte tiny urls. This can return outputs (in the form of LiteralsResolver, or
individual Literals for singular requests), or HTML if passed a deck link, or bytes containing HTML,
if ipython is not available locally.
"""
) -> typing.Optional[typing.Union[LiteralsResolver, HTML, bytes]]:
if flyte_uri is None:
raise user_exceptions.FlyteUserException("flyte_uri cannot be empty")
ctx = self._ctx or FlyteContextManager.current_context()
Expand All @@ -242,8 +237,6 @@ def get(
if data_response.HasField("literal_map"):
lm = LiteralMap.from_flyte_idl(data_response.literal_map)
return LiteralsResolver(lm.literals)
elif data_response.HasField("literal"):
return data_response.literal
elif data_response.HasField("pre_signed_urls"):
if len(data_response.pre_signed_urls.signed_url) == 0:
raise ValueError(f"Flyte url {flyte_uri} resolved to empty download link")
Expand All @@ -265,7 +258,7 @@ def get(
except user_exceptions.FlyteUserException as e:
remote_logger.info(f"Error from Flyte backend when trying to fetch data: {e.__cause__}")

remote_logger.info(f"Nothing found from {flyte_uri}")
remote_logger.debug(f"Nothing found from {flyte_uri}")

def remote_context(self):
"""Context manager with remote-specific configuration."""
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
install_requires=[
"googleapis-common-protos>=1.57",
"flyteidl>=1.5.6",
"flyteidl>=1.5.4",
"wheel>=0.30.0,<1.0.0",
"pandas>=1.0.0,<2.0.0",
"pyarrow>=4.0.0,<11.0.0",
Expand Down Expand Up @@ -64,6 +64,7 @@
"marshmallow-jsonschema>=0.12.0",
"natsort>=7.0.1",
"docker-image-py>=0.1.10",
"singledispatchmethod; python_version < '3.8.0'",
"typing_extensions",
"docstring-parser>=0.9.0",
"diskcache>=5.2.1",
Expand Down

0 comments on commit 75ea89b

Please sign in to comment.