in src/smexperiments/trial.py [0:0]
def remove_trial_component(self, tc):
"""Remove the specified trial component from this trial.
Args:
tc (str or Tracker or TrialComponent or TrialComponentSummary): The trial component to
remove. Can be one of a Tracker instance, a TrialComponent instance, or a string
containing the name of the trial component to remove.
"""
if isinstance(tc, tracker.Tracker):
trial_component_name = tc.trial_component.trial_component_name
elif isinstance(tc, trial_component.TrialComponent):
trial_component_name = tc.trial_component_name
elif isinstance(tc, api_types.TrialComponentSummary):
trial_component_name = tc.trial_component_name
else:
trial_component_name = str(tc)
self.sagemaker_boto_client.disassociate_trial_component(
TrialName=self.trial_name, TrialComponentName=trial_component_name
)