From 2e6e0c1a1d0a25f955da60b25b91436f6f341f05 Mon Sep 17 00:00:00 2001 From: Alex Burlacu Date: Thu, 23 Mar 2023 13:11:07 +0200 Subject: [PATCH] Do not allow dataset metadata entries that start with data_ --- clearml/datasets/dataset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clearml/datasets/dataset.py b/clearml/datasets/dataset.py index d8b2eedc..31e7705a 100644 --- a/clearml/datasets/dataset.py +++ b/clearml/datasets/dataset.py @@ -807,6 +807,8 @@ class Dataset(object): Attach a user-defined metadata to the dataset. Check `Task.upload_artifact` for supported types. If type is Optionally make it visible as a table in the UI. """ + if metadata_name.startswith(self.__data_entry_name_prefix): + raise ValueError("metadata_name can not start with '{}'".format(self.__data_entry_name_prefix)) self._task.upload_artifact(name=metadata_name, artifact_object=metadata) if ui_visible: if pd and isinstance(metadata, pd.DataFrame):