Skip to content

Commit

Permalink
Fix resume: create init command does a path cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mmourafiq committed Aug 15, 2019
1 parent d6d1c11 commit 488d185
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions polyaxon/polypod/templates/experiment_jobs/manager.py
Expand Up @@ -186,12 +186,8 @@ def _get_container_pod_env_vars(self,

def get_init_path_args(self, persistence_outputs):
if self.original_name is not None and self.cloning_strategy == CloningStrategy.RESUME:
command = InitCommands.CREATE
outputs_path = stores.get_experiment_outputs_path(
persistence=persistence_outputs,
experiment_name=self.original_name)
original_outputs_path = None
elif self.original_name is not None and self.cloning_strategy == CloningStrategy.COPY:
return None
if self.original_name is not None and self.cloning_strategy == CloningStrategy.COPY:
command = InitCommands.COPY
outputs_path = stores.get_experiment_outputs_path(
persistence=persistence_outputs,
Expand Down Expand Up @@ -223,7 +219,8 @@ def get_init_container(self,
volume_mounts = outputs_volume_mount + to_list(context_mounts, check_none=True)
init_command = init_command or ["/bin/sh", "-c"]
init_args = init_args or []
init_args += to_list(self.get_init_path_args(persistence_outputs=persistence_outputs))
init_args += to_list(self.get_init_path_args(persistence_outputs=persistence_outputs),
check_none=True)
init_args += to_list(get_auth_context_args(entity='experiment',
entity_name=self.experiment_name))
return [
Expand Down

0 comments on commit 488d185

Please sign in to comment.