File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -976,8 +976,9 @@ def push_tag(self, tag: str) -> None:
976976 Tag to attach to the dataset.
977977 """
978978 if self .dataset_id is None :
979- raise ValueError (
980- "Dataset does not have an ID. Please publish the dataset before tagging."
979+ raise openml .exceptions .ObjectNotPublishedError (
980+ "Cannot tag an dataset that has not been published yet."
981+ "Please publish the object first before being able to tag it."
981982 )
982983 openml ._backend .dataset .tag (self .dataset_id , tag )
983984
@@ -990,8 +991,9 @@ def remove_tag(self, tag: str) -> None:
990991 Tag to remove from the dataset.
991992 """
992993 if self .dataset_id is None :
993- raise ValueError (
994- "Dataset does not have an ID. Please publish the dataset before untagging."
994+ raise openml .exceptions .ObjectNotPublishedError (
995+ "Cannot tag an dataset that has not been published yet."
996+ "Please publish the object first before being able to tag it."
995997 )
996998 openml ._backend .dataset .untag (self .dataset_id , tag )
997999
You can’t perform that action at this time.
0 commit comments