clearml/trains/config/remote.py

18 lines
446 B
Python
Raw Normal View History

2019-06-10 17:00:28 +00:00
from .defs import TASK_ID_ENV_VAR
running_remotely_task_id = TASK_ID_ENV_VAR.get()
def override_current_task_id(task_id):
"""
Overrides the current task id to simulate remote running with a specific task.
Use for testing and debug only.
:param task_id: The task's id to use as the remote task.
Pass None to simulate local execution.
"""
global running_remotely_task_id
running_remotely_task_id = task_id