Lineage¶
Artifact¶
- class sagemaker.lineage.artifact.Artifact(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker artifact, which is part of a SageMaker lineage.
Examples
from sagemaker.lineage import artifact my_artifact = artifact.Artifact.create( artifact_name='MyArtifact', artifact_type='S3File', source_uri='s3://...') my_artifact.properties["added"] = "property" my_artifact.save() for artfct in artifact.Artifact.list(): print(artfct) my_artifact.delete()
- source¶
The source of the artifact with a URI and types.
- Type
obj
- creation_time¶
When the artifact was created.
- Type
datetime
- created_by¶
Contextual info on which account created the artifact.
- Type
obj
- last_modified_time¶
When the artifact was last modified.
- Type
datetime
- last_modified_by¶
Contextual info on which account created the artifact.
- Type
obj
Init Record.
- class sagemaker.lineage.artifact.ModelArtifact(sagemaker_session=None, **kwargs)¶
A SageMaker lineage artifact representing a model.
Common model specific lineage traversals to discover how the model is connected to other entities.
Init Record.
- class sagemaker.lineage.artifact.DatasetArtifact(sagemaker_session=None, **kwargs)¶
A SageMaker Lineage artifact representing a dataset.
Encapsulates common dataset specific lineage traversals to discover how the dataset is connect to related entities.
Init Record.
- class sagemaker.lineage.artifact.ImageArtifact(sagemaker_session=None, **kwargs)¶
A SageMaker lineage artifact representing an image.
Common model specific lineage traversals to discover how the image is connected to other entities.
Init Record.
Actions¶
- class sagemaker.lineage.action.Action(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker action, which is part of a SageMaker lineage.
Examples
from sagemaker.lineage import action my_action = action.Action.create( action_name='MyAction', action_type='EndpointDeployment', source_uri='s3://...') my_action.properties["added"] = "property" my_action.save() for actn in action.Action.list(): print(actn) my_action.delete()
- source¶
The source of the action with a URI and type.
- Type
obj
- creation_time¶
When the action was created.
- Type
datetime
- created_by¶
Contextual info on which account created the action.
- Type
obj
- last_modified_time¶
When the action was last modified.
- Type
datetime
- last_modified_by¶
Contextual info on which account created the action.
- Type
obj
Init Record.
- class sagemaker.lineage.action.ModelPackageApprovalAction(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker model package approval action, which is part of a SageMaker lineage.
Init Record.
Association¶
- class sagemaker.lineage.association.Association(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker artifact, which is part of a SageMaker lineage.
Examples
from sagemaker.lineage import association my_association = association.Association.create( source_arn=artifact_arn, destination_arn=trial_component_arn, association_type='ContributedTo') for assoctn in association.Association.list(): print(assoctn) my_association.delete()
Init Record.
Context¶
- class sagemaker.lineage.context.Context(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker context, which is part of a SageMaker lineage.
- source¶
The source of the context with a URI and type.
- Type
obj
- creation_time¶
When the context was created.
- Type
datetime
- created_by¶
Contextual info on which account created the context.
- Type
obj
- last_modified_time¶
When the context was last modified.
- Type
datetime
- last_modified_by¶
Contextual info on which account created the context.
- Type
obj
Init Record.
- class sagemaker.lineage.context.EndpointContext(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker endpoint context, which is part of a SageMaker lineage.
Init Record.
- class sagemaker.lineage.context.ModelPackageGroup(sagemaker_session=None, **kwargs)¶
An Amazon SageMaker model package group context, which is part of a SageMaker lineage.
Init Record.
Lineage Trial Component¶
- class sagemaker.lineage.lineage_trial_component.LineageTrialComponent(sagemaker_session=None, **kwargs)¶
An 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
- display_name¶
The name of the trial component that will appear in UI, such as SageMaker Studio.
- Type
- source¶
A TrialComponentSource object with a source_arn attribute.
- Type
obj
- 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
- metrics¶
Aggregated metrics for the job.
- Type
obj
Init Record.
Query¶
- class sagemaker.lineage.query.LineageEntityEnum(value)¶
Enum of lineage entities for use in a query filter.
- class sagemaker.lineage.query.LineageSourceEnum(value)¶
Enum of lineage types for use in a query filter.
- class sagemaker.lineage.query.LineageQueryDirectionEnum(value)¶
Enum of query filter directions.
- class sagemaker.lineage.query.Edge(source_arn, destination_arn, association_type)¶
A connecting edge for a lineage graph.
Initialize
Edge
instance.
- class sagemaker.lineage.query.Vertex(arn, lineage_entity, lineage_source, sagemaker_session)¶
A vertex for a lineage graph.
Initialize
Vertex
instance.
- class sagemaker.lineage.query.LineageQueryResult(edges=None, vertices=None, startarn=None)¶
A wrapper around the results of a lineage query.
Init for LineageQueryResult.
- class sagemaker.lineage.query.LineageFilter(entities=None, sources=None, created_before=None, created_after=None, modified_before=None, modified_after=None, properties=None)¶
A filter used in a lineage query.
Initialize
LineageFilter
instance.- Parameters
entities (Optional[List[Union[LineageEntityEnum, str]]]) –
sources (Optional[List[Union[LineageSourceEnum, str]]]) –
- class sagemaker.lineage.query.LineageQuery(sagemaker_session)¶
Creates an object used for performing lineage queries.
Initialize
LineageQuery
instance.