From 99e1e54f94a4f0c60fe71a6c019ebeda79bd9195 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 27 Aug 2024 22:53:14 +0300 Subject: [PATCH] Add support for tasks containing only bash script or python module command --- clearml_agent/commands/worker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clearml_agent/commands/worker.py b/clearml_agent/commands/worker.py index 0a6fe93..be03aba 100644 --- a/clearml_agent/commands/worker.py +++ b/clearml_agent/commands/worker.py @@ -3153,9 +3153,11 @@ class Worker(ServiceCommandSection): has_repository = bool(execution.repository) is_literal_script = literal_script.is_literal_script(task) if not has_repository and not is_literal_script: - raise CommandFailedError( - "Can not run task without repository or literal script in `script.diff`" - ) + print("WARNING: running a task without repository or literal script in `script.diff`") + location = Path(venv_folder) / WORKING_STANDALONE_DIR + location.mkdir(exist_ok=True, parents=True) + return location.as_posix(), None, None + repo_info = None directory = None vcs = None