Skip to content

Commit

Permalink
Add torchx session id as Environment variable
Browse files Browse the repository at this point in the history
Differential Revision: D66387522

Pull Request resolved: #974
  • Loading branch information
yikaiMeta authored Nov 27, 2024
1 parent 26cb186 commit 648913c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torchx/runner/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 648913c

Please sign in to comment.