From aea7e3ec6dc5c3dd73c7c5a0f9db20de1ffa9361 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 28 Mar 2024 15:02:49 +0200 Subject: [PATCH] Fix clearml-data CLI tool will move non-dataset tasks to a .dataset project if the respective task is not a dataset --- clearml/datasets/dataset.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clearml/datasets/dataset.py b/clearml/datasets/dataset.py index ef6759dd..e0212485 100644 --- a/clearml/datasets/dataset.py +++ b/clearml/datasets/dataset.py @@ -1676,6 +1676,10 @@ class Dataset(object): def get_instance(dataset_id_): task = Task.get_task(task_id=dataset_id_) + + if cls.__tag not in task.get_system_tags(): + raise ValueError("Provided id={} is not a Dataset ID".format(task.id)) + if task.status == "created": raise ValueError("Dataset id={} is in draft mode, delete and recreate it".format(task.id)) force_download = False if task.status in ("stopped", "published", "closed", "completed") else True