sagemaker.core.lineage.lineage_trial_component#
This module contains code to create and manage SageMaker LineageTrialComponent.
Classes
|
An Amazon SageMaker, lineage trial component, which is part of a SageMaker lineage. |
- class sagemaker.core.lineage.lineage_trial_component.LineageTrialComponent(sagemaker_session=None, **kwargs)[source]#
Bases:
RecordAn Amazon SageMaker, lineage trial component, which is part of a SageMaker lineage.
A trial component is a stage in a trial. Trial components are created automatically within the SageMaker runtime and also can be created directly. To automatically associate trial components with a trial and experiment supply an experiment config when creating a job. For example: https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html
- trial_component_name#
The name of the trial component. Generated by SageMaker from the name of the source job with a suffix specific to the type of source job. trial_component_arn (str): The ARN of the trial component.
- Type:
str
- display_name#
The name of the trial component that will appear in UI, such as SageMaker Studio.
- Type:
str
- source#
A TrialComponentSource object with a source_arn attribute.
- Type:
obj
- status#
Status of the source job.
- Type:
str
- start_time#
When the source job started.
- Type:
datetime
- end_time#
When the source job ended.
- Type:
datetime
- creation_time#
When the source job was created.
- Type:
datetime
- created_by#
Contextual info on which account created the trial component.
- Type:
obj
- last_modified_time#
When the trial component was last modified.
- Type:
datetime
- last_modified_by#
Contextual info on which account last modified the trial component.
- Type:
obj
- parameters#
Dictionary of parameters to the source job.
- Type:
dict
- input_artifacts#
Dictionary of input artifacts.
- Type:
dict
- output_artifacts#
Dictionary of output artifacts.
- Type:
dict
- metrics#
Aggregated metrics for the job.
- Type:
obj
- parameters_to_remove#
The hyperparameters to remove from the component.
- Type:
list
- input_artifacts_to_remove#
The input artifacts to remove from the component.
- Type:
list
- output_artifacts_to_remove#
The output artifacts to remove from the component.
- Type:
list
- tags#
A list of tags to associate with the trial component.
- Type:
List[dict[str, str]]
- created_by = None#
- creation_time = None#
- dataset_artifacts(direction: LineageQueryDirectionEnum = LineageQueryDirectionEnum.ASCENDANTS) List[Artifact][source]#
Use the lineage query to retrieve datasets that use this trial component.
- Parameters:
direction (LineageQueryDirectionEnum, optional) – The query direction.
- Returns:
Artifacts representing a dataset.
- Return type:
list of Artifacts
- display_name = None#
- end_time = None#
- input_artifacts = None#
- input_artifacts_to_remove = None#
- last_modified_by = None#
- last_modified_time = None#
- classmethod load(trial_component_name: str, sagemaker_session=None) LineageTrialComponent[source]#
Load an existing trial component and return an
TrialComponentobject representing it.- Parameters:
trial_component_name (str) – Name of the trial component
sagemaker_session (sagemaker.session.Session) – Session object which manages interactions with Amazon SageMaker APIs and any other AWS services needed. If not specified, one is created using the default AWS configuration chain.
- Returns:
A SageMaker
LineageTrialComponentobject- Return type:
- metrics = None#
- models(direction: LineageQueryDirectionEnum = LineageQueryDirectionEnum.DESCENDANTS) List[Artifact][source]#
Use the lineage query to retrieve models that use this trial component.
- Parameters:
direction (LineageQueryDirectionEnum, optional) – The query direction.
- Returns:
Artifacts representing a dataset.
- Return type:
list of Artifacts
- output_artifacts = None#
- output_artifacts_to_remove = None#
- parameters = None#
- parameters_to_remove = None#
- pipeline_execution_arn() str[source]#
Get the ARN for the pipeline execution associated with this trial component (if any).
- Returns:
A pipeline execution ARN.
- Return type:
str
- source = None#
- start_time = None#
- status = None#
- tags = None#
- trial_component_arn = None#
- trial_component_name = None#