Skip to content

Register paths with data manager in namespace serialization #169

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions jupyter_workflow/streamflow/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ async def _deserialize_namespace(
dst_path = os.path.join(
mkdtemp(), path_processor.basename(namespace[name])
)

for location in self.step.workflow.context.scheduler.get_locations(job.name):
self.step.workflow.context.data_manager.register_path(
location=location,
path=namespace[name],
)
await asyncio.gather(
*(
asyncio.create_task(
Expand Down Expand Up @@ -208,6 +214,15 @@ async def _transfer_file(self, job: Job, path: str) -> str:
dst_connector = self.step.workflow.context.scheduler.get_connector(job.name)
path_processor = get_path_processor(dst_connector)
dst_path = path_processor.join(job.input_directory, os.path.basename(path))

src_loc = ExecutionLocation(deployment=LocalTarget.deployment_name, local=True, name="__LOCAL__")
self.step.workflow.context.data_manager.register_path(
location=src_loc,
path=path,
relpath=os.path.basename(path),
)


await self.step.workflow.context.data_manager.transfer_data(
src_location=ExecutionLocation(
deployment=LocalTarget.deployment_name, local=True, name="__LOCAL__"
Expand Down
Loading