diff --git a/torchx/runner/api.py b/torchx/runner/api.py index 39efc0555..4a03a8aad 100644 --- a/torchx/runner/api.py +++ b/torchx/runner/api.py @@ -39,6 +39,7 @@ ENV_TORCHX_TRACKERS, tracker_config_env_var_name, ) +from torchx.util.session import get_session_id_or_create_new, TORCHX_INTERNAL_SESSION_ID from torchx.util.types import none_throws from torchx.workspace.api import PkgInfo, WorkspaceBuilder, WorkspaceMixin @@ -390,6 +391,7 @@ def dryrun( role.env[ENV_TORCHX_JOB_ID] = make_app_handle( scheduler, self._name, macros.app_id ) + role.env[TORCHX_INTERNAL_SESSION_ID] = get_session_id_or_create_new() if parent_run_id: role.env[ENV_TORCHX_PARENT_RUN_ID] = parent_run_id