Skip to content

Commit 844faf5

Browse files
committed
first round of changes
1 parent ca8b72d commit 844faf5

11 files changed

Lines changed: 182 additions & 131108 deletions

File tree

openml/_api/resources/task.py

Lines changed: 153 additions & 194 deletions
Large diffs are not rendered by default.

openml/tasks/task.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ def push_tag(self, tag: str) -> None:
264264
Tag to attach to the task.
265265
"""
266266
if self.task_id is None:
267-
raise ValueError("Task does not have an ID. Please publish the task before tagging.")
267+
raise openml.exceptions.ObjectNotPublishedError(
268+
"Please publish the task first before being able to tag it."
269+
)
268270
openml._backend.task.tag(self.task_id, tag)
269271

270272
def remove_tag(self, tag: str) -> None:
@@ -276,8 +278,8 @@ def remove_tag(self, tag: str) -> None:
276278
Tag to remove from the task.
277279
"""
278280
if self.task_id is None:
279-
raise ValueError(
280-
"Dataset does not have an ID. Please publish the dataset before untagging."
281+
raise openml.exceptions.ObjectNotPublishedError(
282+
"Please publish the task first before being able to untag it."
281283
)
282284
openml._backend.task.untag(self.task_id, tag)
283285

0 commit comments

Comments
 (0)