2020from sagemaker .apiutils import _base_types
2121from sagemaker .experiments import _api_types
2222from sagemaker .experiments ._api_types import TrialComponentSearchResult
23+ from sagemaker .utils import format_tags
2324
2425
2526class _TrialComponent (_base_types .Record ):
@@ -191,7 +192,7 @@ def create(cls, trial_component_name, display_name=None, tags=None, sagemaker_se
191192 Args:
192193 trial_component_name (str): The name of the trial component.
193194 display_name (str): Display name of the trial component used by Studio (default: None).
194- tags (List[Dict[str, str] ]): Tags to add to the trial component (default: None).
195+ tags (Optional[Tags ]): Tags to add to the trial component (default: None).
195196 sagemaker_session (sagemaker.session.Session): Session object which
196197 manages interactions with Amazon SageMaker APIs and any other
197198 AWS services needed. If not specified, one is created using the
@@ -204,7 +205,7 @@ def create(cls, trial_component_name, display_name=None, tags=None, sagemaker_se
204205 cls ._boto_create_method ,
205206 trial_component_name = trial_component_name ,
206207 display_name = display_name ,
207- tags = tags ,
208+ tags = format_tags ( tags ) ,
208209 sagemaker_session = sagemaker_session ,
209210 )
210211
@@ -316,7 +317,7 @@ def _load_or_create(
316317 display_name (str): Display name of the trial component used by Studio (default: None).
317318 This is used only when the given `trial_component_name` does not
318319 exist and a new trial component has to be created.
319- tags (List[Dict[str, str] ]): Tags to add to the trial component (default: None).
320+ tags (Optional[Tags ]): Tags to add to the trial component (default: None).
320321 This is used only when the given `trial_component_name` does not
321322 exist and a new trial component has to be created.
322323 sagemaker_session (sagemaker.session.Session): Session object which
@@ -333,7 +334,7 @@ def _load_or_create(
333334 run_tc = _TrialComponent .create (
334335 trial_component_name = trial_component_name ,
335336 display_name = display_name ,
336- tags = tags ,
337+ tags = format_tags ( tags ) ,
337338 sagemaker_session = sagemaker_session ,
338339 )
339340 except ClientError as ce :
0 commit comments