@@ -43,10 +43,12 @@ class Trial(_base_types.Record):
4343 Attributes:
4444 trial_name (str): The name of the trial.
4545 experiment_name (str): The name of the trial's experiment.
46+ tags (List[dict[str, str]]): A list of tags to associate with the trial.
4647 """
4748
4849 trial_name = None
4950 experiment_name = None
51+ tags = None
5052
5153 _boto_create_method = "create_trial"
5254 _boto_load_method = "describe_trial"
@@ -96,15 +98,16 @@ def load(cls, trial_name, sagemaker_boto_client=None):
9698 )
9799
98100 @classmethod
99- def create (cls , experiment_name , trial_name = None , sagemaker_boto_client = None , trial_components = None ):
101+ def create (cls , experiment_name , trial_name = None , sagemaker_boto_client = None , trial_components = None , tags = None ):
100102 """Create a new trial and return a ``Trial`` object.
101103
102104 Args:
103105 experiment_name: (str): Name of the experiment to create this trial in.
104106 trial_name: (str, optional): Name of the Trial. If not specified, an auto-generated name will be used.
105107 sagemaker_boto_client (SageMaker.Client, optional): Boto3 client for SageMaker.
106108 If not supplied, a default boto3 client will be created and used.
107- trial_components (list): A list of trial component names, trial components, or trial component trackers
109+ trial_components (list): A list of trial component names, trial components, or trial component trackers.
110+ tags (List[dict[str, str]]): A list of tags to associate with the trial.
108111
109112 Returns:
110113 smexperiments.trial.Trial: A SageMaker ``Trial`` object
@@ -114,6 +117,7 @@ def create(cls, experiment_name, trial_name=None, sagemaker_boto_client=None, tr
114117 cls ._boto_create_method ,
115118 trial_name = trial_name ,
116119 experiment_name = experiment_name ,
120+ tags = tags ,
117121 sagemaker_boto_client = sagemaker_boto_client ,
118122 )
119123 if trial_components :
0 commit comments