<#3254 fix file/directory download in a pytorch el...
# flyte-github
c
#3254 fix file/directory download in a pytorch elastic task Pull request opened by samhita-alla ## Tracking issue ## Why are the changes needed? When running an
Elastic
task with the multiprocessing start method set to
spawn
, files or directories are not being downloaded as expected. This is due to the following warning at runtime: /opt/micromamba/envs/runtime/lib/python3.12/site-packages/flytekit/types/directory/types.py197 RuntimeWarning: coroutine 'FileAccessProvider.async_get_data' was never awaited # self._downloader() ## What changes were proposed in this pull request? This occurs because the
_downloader
reference can incorrectly point to the underlying async coroutine (
async_get_data
) instead of the intended sync-wrapped
get_data
method, especially after pickling and spawning a new process. This PR ensures that the correct synchronous function is invoked during deserialization and execution. ## How was this patch tested? Tested the change by running an
Elastic
task on a remote deployment, and verified that the file/directory download now works as expected. ### Setup process ### Screenshots ## 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 flyteorg/flytekit