mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
18 lines
446 B
Python
18 lines
446 B
Python
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
|