Definition for TFX Importer.
tfx.v1.dsl.Importer(
source_uri: str,
artifact_type: Type[tfx.v1.dsl.Artifact
],
reimport: Optional[bool] = False,
properties: Optional[Dict[str, Union[str, int]]] = None,
custom_properties: Optional[Dict[str, Union[str, int]]] = None
)
Used in the notebooks
Used in the tutorials |
---|
The Importer is a special TFX node which registers an external resource into MLMD so that downstream nodes can use the registered artifact as an input.
Here is an example to use the Importer:
importer = Importer(
source_uri='uri/to/schema',
artifact_type=standard_artifacts.Schema,
reimport=False).with_id('import_schema')
schema_gen = SchemaGen(
fixed_schema=importer.outputs['result'],
examples=...)
Args | |
---|---|
source_uri
|
the URI of the resource that needs to be registered. |
artifact_type
|
the type of the artifact to import. |
reimport
|
whether or not to re-import as a new artifact if the URI has been imported in before. |
properties
|
Dictionary of properties for the imported Artifact. These properties should be ones declared for the given artifact_type (see the PROPERTIES attribute of the definition of the type for details). |
custom_properties
|
Dictionary of custom properties for the imported Artifact. These properties should be of type Text or int. |
Attributes | |
---|---|
outputs
|
Output Channel dict that contains imported artifacts. |