in src/smexperiments/trial.py [0:0]
def create(cls, experiment_name, trial_name=None, sagemaker_boto_client=None, trial_components=None, tags=None):
"""Create a new trial and return a ``Trial`` object.
Args:
experiment_name: (str): Name of the experiment to create this trial in.
trial_name: (str, optional): Name of the Trial. If not specified, an auto-generated name will be used.
sagemaker_boto_client (SageMaker.Client, optional): Boto3 client for SageMaker.
If not supplied, a default boto3 client will be created and used.
trial_components (list): A list of trial component names, trial components, or trial component trackers.
tags (List[dict[str, str]]): A list of tags to associate with the trial.
Returns:
smexperiments.trial.Trial: A SageMaker ``Trial`` object
"""
trial_name = trial_name or _utils.name("Trial")
trial = super(Trial, cls)._construct(
cls._boto_create_method,
trial_name=trial_name,
experiment_name=experiment_name,
tags=tags,
sagemaker_boto_client=sagemaker_boto_client,
)
if trial_components:
for tc in trial_components:
trial.add_trial_component(tc)
return trial