11from collections import OrderedDict
22import pickle
33import time
4- from typing import Any , IO , Optional , TextIO , TYPE_CHECKING # noqa: F401
4+ from typing import Any , IO , TextIO
55import os
66
77import arff
1919 OpenMLClusteringTask ,
2020 OpenMLRegressionTask
2121 )
22+ from ..utils import _tag_entity
2223
2324
2425class OpenMLRun (object ):
@@ -472,8 +473,7 @@ def push_tag(self, tag: str) -> None:
472473 tag : str
473474 Tag to attach to the run.
474475 """
475- data = {'run_id' : self .run_id , 'tag' : tag }
476- openml ._api_calls ._perform_api_call ("/run/tag" , 'post' , data = data )
476+ _tag_entity ('run' , self .run_id , tag )
477477
478478 def remove_tag (self , tag : str ) -> None :
479479 """Removes a tag from this run on the server.
@@ -483,8 +483,7 @@ def remove_tag(self, tag: str) -> None:
483483 tag : str
484484 Tag to attach to the run.
485485 """
486- data = {'run_id' : self .run_id , 'tag' : tag }
487- openml ._api_calls ._perform_api_call ("/run/untag" , 'post' , data = data )
486+ _tag_entity ('run' , self .run_id , tag , untag = True )
488487
489488
490489###############################################################################
0 commit comments