From 75ea89becee579b0d49243c63b7037f36efd1fb0 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 12 Jun 2023 09:44:52 -0700 Subject: [PATCH] Revert "Support single literals in tiny url (#1654)" This reverts commit e9a714bebfa6095b3cfd2ea0351a8f8f9cbb6e14. --- doc-requirements.txt | 2 +- flytekit/remote/remote.py | 11 ++--------- setup.py | 3 ++- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/doc-requirements.txt b/doc-requirements.txt index 5264673f4f..1929925e84 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -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 diff --git a/flytekit/remote/remote.py b/flytekit/remote/remote.py index e0a411de50..8b05ba69dc 100644 --- a/flytekit/remote/remote.py +++ b/flytekit/remote/remote.py @@ -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() @@ -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") @@ -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.""" diff --git a/setup.py b/setup.py index 5273590d9f..8e057f4b91 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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",