Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FlyteFile and FlyteDirectory pickleable #3030

Merged
merged 11 commits into from
Jan 8, 2025

Conversation

cosmicBboy
Copy link
Contributor

@cosmicBboy cosmicBboy commented Jan 3, 2025

Tracking issue

flyteorg/flyte#6144

Why are the changes needed?

Because doing distributed training with the Elastic plugin fails when trying to run a task with FlyteDirectory or FlyteFile inputs.

What changes were proposed in this pull request?

  • pulls out the _downloader as a module-level function that's made into a partial when converting FlyteFile/Directory literals into python values.

How was this patch tested?

Unit tests were updated to test for round-trip pickling.

Check all the applicable boxes

  • [ ] I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

Implementation of pickleable downloaders for FlyteFile and FlyteDirectory by replacing lambda functions with functools.partial. This critical fix enables distributed training with the Elastic plugin by ensuring proper serialization of file handling objects. Changes include restructuring downloader implementation, moving FileAccessProvider import, and streamlining file access through context object.

Unit tests added: True

Estimated effort to review (1-5, lower is better): 2

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 3, 2025

Code Review Agent Run #639caa

Actionable Suggestions - 3
  • tests/flytekit/unit/core/test_flyte_directory.py - 1
    • Consider adding more pickle test assertions · Line 445-448
  • flytekit/types/directory/types.py - 2
Review Details
  • Files reviewed - 4 · Commit Range: 8a0804e..2060962
    • flytekit/types/directory/types.py
    • flytekit/types/file/file.py
    • tests/flytekit/unit/core/test_flyte_directory.py
    • tests/flytekit/unit/core/test_flyte_file.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 3, 2025

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - Make File Handling Objects Pickleable

types.py - Replace lambda downloader with functools.partial for serialization

file.py - Refactor downloader implementation to use functools.partial

test_flyte_directory.py - Add pickle serialization tests for FlyteDirectory

test_flyte_file.py - Add pickle serialization tests for FlyteFile

Comment on lines +445 to +448
# test round trip pickling
pickled_input = pickle.dumps(downstream_input)
unpickled_input = pickle.loads(pickled_input)
assert downstream_input == unpickled_input
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding more pickle test assertions

Consider adding more assertions to verify the pickled/unpickled FlyteDirectory object's properties like uri and other attributes are preserved correctly after deserialization.

Code suggestion
Check the AI-generated fix before applying
Suggested change
# test round trip pickling
pickled_input = pickle.dumps(downstream_input)
unpickled_input = pickle.loads(pickled_input)
assert downstream_input == unpickled_input
# test round trip pickling
pickled_input = pickle.dumps(downstream_input)
unpickled_input = pickle.loads(pickled_input)
assert downstream_input == unpickled_input
assert unpickled_input.uri == "s3://sample-path/directory"

Code Review Run #639caa


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines 687 to 688
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
return file_access_provider.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding error handling for downloader

Consider adding error handling for the case where file_access_provider.get_data() fails. The function should handle potential exceptions that may occur during data retrieval. A similar issue was also found in flytekit/types/file/file.py (line 717-718).

Code suggestion
Check the AI-generated fix before applying
Suggested change
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
return file_access_provider.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
try:
return file_access_provider.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)
except Exception as e:
raise TypeTransformerFailedError(
f"Failed to download directory from {uri} to {local_folder}: {str(e)}"
)

Code Review Run #639caa


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

@@ -683,4 +684,8 @@ def guess_python_type(self, literal_type: LiteralType) -> typing.Type[FlyteDirec
raise ValueError(f"Transformer {self} cannot reverse {literal_type}")


def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding return type annotation

Consider adding type hints for the return value of _flyte_directory_downloader. The function appears to return a result from get_data() but its return type is not specified.

Code suggestion
Check the AI-generated fix before applying
Suggested change
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int) -> Any:

Code Review Run #639caa


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Copy link

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 51.81%. Comparing base (f3996f6) to head (6d17e5c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
flytekit/types/directory/types.py 60.00% 2 Missing ⚠️
flytekit/types/file/file.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3030      +/-   ##
==========================================
+ Coverage   51.28%   51.81%   +0.52%     
==========================================
  Files         201      201              
  Lines       21281    21289       +8     
  Branches     2734     2734              
==========================================
+ Hits        10915    11031     +116     
+ Misses       9767     9739      -28     
+ Partials      599      519      -80     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 4, 2025

Code Review Agent Run #f65ef4

Actionable Suggestions - 1
  • flytekit/types/file/file.py - 1
    • Consider naming the downloader lambda function · Line 741-743
Review Details
  • Files reviewed - 10 · Commit Range: 2060962..6d17e5c
    • flytekit/clis/sdk_in_container/run.py
    • flytekit/types/file/file.py
    • plugins/flytekit-inference/flytekitplugins/inference/__init__.py
    • plugins/flytekit-inference/flytekitplugins/inference/vllm/serve.py
    • plugins/flytekit-inference/setup.py
    • plugins/flytekit-inference/tests/test_vllm.py
    • tests/flytekit/integration/remote/test_remote.py
    • tests/flytekit/integration/remote/utils.py
    • tests/flytekit/integration/remote/workflows/basic/flytefile.py
    • tests/flytekit/integration/remote/workflows/basic/pydantic_wf.py
  • Files skipped - 1
    • plugins/flytekit-inference/README.md - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

Comment on lines 741 to 743
ff = FlyteFile.__class_getitem__(expected_format)(
path=local_path, downloader=lambda: self.downloader(ctx=ctx, remote_path=uri, local_path=local_path)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider naming the downloader lambda function

Consider using a more descriptive lambda function name instead of an anonymous lambda. A named function would better document the purpose of the downloader callback.

Code suggestion
Check the AI-generated fix before applying
Suggested change
ff = FlyteFile.__class_getitem__(expected_format)(
path=local_path, downloader=lambda: self.downloader(ctx=ctx, remote_path=uri, local_path=local_path)
)
download_callback = partial(self.downloader, ctx=ctx, remote_path=uri, local_path=local_path)
ff = FlyteFile.__class_getitem__(expected_format)(
path=local_path, downloader=download_callback
)

Code Review Run #f65ef4


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

@@ -665,8 +667,7 @@ async def async_to_python_value(

batch_size = get_batch_size(expected_python_type)

def _downloader():
return ctx.file_access.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)
_downloader = partial(_flyte_directory_downloader, ctx.file_access, uri, local_folder, batch_size)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again, I think we can partial ctx.file_access itself and not need to define _flyte_directory_downloader.

_downloader = partial(ctx.file_access.get_data, url, local_folder, is_multipart=True, batch_size=batch_size)

@@ -732,12 +734,14 @@ async def async_to_python_value(

# For the remote case, return an FlyteFile object that can download
local_path = ctx.file_access.get_random_local_path(uri)

_downloader = partial(_flyte_file_downloader, ctx.file_access, uri, local_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here regarding partialing ctx.file_access.get_data directly.

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
@cosmicBboy cosmicBboy force-pushed the bugfix/pickleable-downloader branch from 6d17e5c to dddde88 Compare January 6, 2025 20:36
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 6, 2025

Code Review Agent Run #be429e

Actionable Suggestions - 2
  • flytekit/types/directory/types.py - 2
Review Details
  • Files reviewed - 4 · Commit Range: 8a0804e..6adf14b
    • flytekit/types/directory/types.py
    • flytekit/types/file/file.py
    • tests/flytekit/unit/core/test_flyte_directory.py
    • tests/flytekit/unit/core/test_flyte_file.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Comment on lines 687 to 688

TypeEngine.register(FlyteDirToMultipartBlobTransformer())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding error handling for downloads

Consider adding error handling for the case where file_access_provider.get_data() fails. The function should handle potential exceptions and provide appropriate error messages.

Code suggestion
Check the AI-generated fix before applying
Suggested change
TypeEngine.register(FlyteDirToMultipartBlobTransformer())
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
try:
return file_access_provider.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)
except Exception as e:
raise TypeTransformerFailedError(
f"Failed to download directory from {uri} to {local_folder}: {str(e)}"
)

Code Review Run #be429e


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int):
return file_access_provider.get_data(uri, local_folder, is_multipart=True, batch_size=batch_size)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing return type hint in function

Consider adding type hints for the return value of _flyte_directory_downloader function to improve code clarity and maintainability.

Code suggestion
Check the AI-generated fix before applying
Suggested change
def _flyte_directory_downloader(file_access_provider: FileAccessProvider, uri: str, local_folder: str, batch_size: int) -> Any:

Code Review Run #be429e


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 6, 2025

Code Review Agent Run #5c2427

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 6adf14b..37f61e2
    • flytekit/types/directory/types.py
    • flytekit/types/file/file.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 7, 2025

Code Review Agent Run #d95336

Actionable Suggestions - 1
  • flytekit/types/file/file.py - 1
Review Details
  • Files reviewed - 2 · Commit Range: 37f61e2..a60450b
    • flytekit/types/directory/types.py
    • flytekit/types/file/file.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

expected_format = FlyteFilePathTransformer.get_format(expected_python_type)
ff = FlyteFile.__class_getitem__(expected_format)(
path=local_path, downloader=lambda: self.downloader(ctx=ctx, remote_path=uri, local_path=local_path)
path=local_path,
downloader=partial(self.downloader, ctx.file_access, remote_path=uri, local_path=local_path),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding type hints to downloader

Consider updating the downloader partial function call to include type hints for better code maintainability and IDE support. The ctx.file_access parameter type could be explicitly specified as FileAccessProvider.

Code suggestion
Check the AI-generated fix before applying
Suggested change
downloader=partial(self.downloader, ctx.file_access, remote_path=uri, local_path=local_path),
downloader=partial(self.downloader, typing.cast(FileAccessProvider, ctx.file_access), remote_path=uri, local_path=local_path),

Code Review Run #d95336


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

return ff

@staticmethod
def downloader(
ctx: FlyteContext, remote_path: typing.Union[str, os.PathLike], local_path: typing.Union[str, os.PathLike]
file_access_provider: FileAccessProvider,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks backward compatibility. Is it safe to change the signature here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell this staticmethod was added in a PR 4 days ago: https://github.com/flyteorg/flytekit/pull/2991/files

And the only call site was in this module itself

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rather not have this be part of the public API. Can this be renamed to _remote_downloader?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also revert this to the older implementation with the pure partial

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me.

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
@cosmicBboy cosmicBboy changed the title Bugfix/pickleable downloader Make FlyteFile and FlyteDirectory pickleable Jan 8, 2025
@cosmicBboy cosmicBboy merged commit 556595a into master Jan 8, 2025
104 checks passed
@flyte-bot
Copy link
Contributor

flyte-bot commented Jan 8, 2025

Code Review Agent Run #0644db

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: a60450b..d0b1d3c
    • flytekit/types/file/file.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 11, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 11, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 19, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 20, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 21, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 21, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
shuyingliang pushed a commit to shuyingliang/flytekit that referenced this pull request Jan 22, 2025
* make _downloader function in FlyteFile/Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* make FlyteFile and Directory pickleable

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unnecessary helper functions

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* use partials instead of lambda

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove unneeded helper function

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* update FlyteFilePathTransformer.downloader method

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* remove downloader staticmethod

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

---------

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Shuying Liang <shuying.liang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants