![]() |
Class Schema
TFX artifact used for orchestration.
Inherits From: Artifact
This is used for type-checking and inter-component communication. Currently, it wraps a tuple of (ml_metadata.proto.Artifact, ml_metadata.proto.ArtifactType) with additional property accessors for internal state.
A user may create a subclass of Artifact and override the TYPE_NAME property with the type for this artifact subclass. Users of the subclass may then omit the "type_name" field when construction the object.
__init__
__init__(
type_name=None,
split=''
)
Construct an instance of Artifact.
Used by TFX internal implementation: create an empty Artifact with type_name and optional split info specified. The remaining info will be filled in during compiling and running time. The Artifact should be transparent to end users and should not be initiated directly by pipeline users.
Args:
type_name
: Name of underlying ArtifactType (optional if the ARTIFACT_TYPE field is provided for the Artifact subclass).split
: Which split this instance of artifact maps to.
Properties
id
Id of underlying artifact.
name
Name of the artifact.
pipeline_name
Name of the pipeline that produce the artifact.
producer_component
Producer component of the artifact.
span
Span of underlying artifact.
split
Split of the underlying artifact is in.
state
State of the underlying artifact.
type_id
Id of underlying artifact type.
type_name
Name of underlying artifact type.
uri
URI of underlying artifact.
Methods
json_dict
json_dict()
Returns a dict suitable for json serialization.
parse_from_json_dict
parse_from_json_dict(
cls,
d
)
Creates a instance of Artifact from a json deserialized dict.
set_artifact
set_artifact(artifact)
Set entire artifact in this object.
set_artifact_type
set_artifact_type(artifact_type)
Set entire ArtifactType in this object.
set_int_custom_property
set_int_custom_property(
key,
value
)
Set a custom property of int type.
set_string_custom_property
set_string_custom_property(
key,
value
)
Set a custom property of string type.