From 67d9a9e5d4e6de7e4fd1f5fec8ef1523f9397e51 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 15 Dec 2019 00:09:36 +0200 Subject: [PATCH] Do not reuse experiment if it has artifacts --- trains/task.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trains/task.py b/trains/task.py index 1abefe25..ea52886e 100644 --- a/trains/task.py +++ b/trains/task.py @@ -942,9 +942,12 @@ class Task(_Task): log_to_backend=True, ) task_tags = task.data.system_tags if hasattr(task.data, 'system_tags') else task.data.tags + task_artifacts = task.data.execution.artifacts \ + if hasattr(task.data.execution, 'artifacts') else None if ((str(task.status) in (str(tasks.TaskStatusEnum.published), str(tasks.TaskStatusEnum.closed))) or task.output_model_id or (ARCHIVED_TAG in task_tags) - or (cls._development_tag not in task_tags)): + or (cls._development_tag not in task_tags) + or task_artifacts): # If the task is published or closed, we shouldn't reset it so we can't use it in dev mode # If the task is archived, or already has an output model, # we shouldn't use it in development mode either