Float-typed artifact.
Inherits From: Artifact
tfx.v1.types.standard_artifacts.Float(
*args, **kwargs
)
Float value artifacts are encoded using Python str() class. However, Nan and Infinity are handled separately. See string constants in the class.
Attributes | |
---|---|
value
|
Value stored in the artifact. |
Methods
annotate_as
@classmethod
annotate_as( type_annotation: Optional[Type[SystemArtifact]] = None )
Annotate the value artifact type with a system artifact class.
Example usage:
from tfx import v1 as tfx
OutputArtifact = tfx.dsl.components.OutputArtifact
String = tfx.types.standard_artifacts.String
Model = tfx.dsl.standard_annotations.Model
@tfx.dsl.components.component
def MyTrainer(
model: OutputArtifact[String.annotate_as(Model)]
):
...
Args | |
---|---|
type_annotation
|
the standard annotations used to annotate the value
artifact type. The possible values are in
tfx.v1.dsl.standard_annotations .
|
Returns | |
---|---|
A subclass of the method caller class (e.g., standard_artifacts.String,
standard_artifacts.Float) with TYPE_ANNOTATION attribute set to be
type_annotation ; returns the original class iftype_annotation is None.
|
Class Variables | |
---|---|
PROPERTIES |
None
|
TYPE_ANNOTATION |
None
|
TYPE_NAME |
'Float'
|