liveBook · Manning

Artifact type

As explained in Machine Learning Platform Engineering

An artifact type is the base KFP type for generic files and data outputs that do not fit a specialized artifact category.

Artifact is KFP’s generic artifact type for files and data outputs that do not fit specialized categories such as Dataset, Model, or Metrics. Use it when a pipeline component must pass a file while preserving descriptive metadata. section 7.2.3 section 8.1.4

Use the generic type when the output is operational data rather than a specialized ML artifact:

  • Annotate configuration files with Output[Artifact], write the file through output_config.path, and attach fields such as config_type and version. section 7.2.3
  • Pass auxiliary validation inputs such as a YOLO data.yaml file as Input[Artifact], alongside specialized Model, Dataset, and Metrics artifacts. section 8.1.4
  • Prefer Dataset, Model, or Metrics when the data matches those specialized categories and their associated tracking behavior. section 7.2.3 section 8.1.4

Versioned training configuration

A component can serialize a configuration dictionary to output_config.path, then record config_type as training_parameters and version as 1.0 in the artifact metadata. A YOLO validation component can consume a similarly packaged data.yaml artifact. section 7.2.3 section 8.1.4

@dsl.component
def save_config(
    config: Dict[str, Any],
    output_config: Output[Artifact]):
    with open(output_config.path, 'w') as f:
        json.dump(config, f)
    output_config.metadata.update({
        'config_type': 'training_parameters',
        'version': '1.0'
    })

Inspect the complete KFP component pattern for writing a configuration file and updating generic artifact metadata. section 7.2.3

How Machine Learning Platform Engineering covers it

How deep it goes
Shows input and output annotations, file serialization, and metadata updates, but does not detail artifact storage internals.
Examples
Uses serialized training parameters and a YOLO data.yaml validation configuration as concrete generic artifacts.
What you can do after
Apply via KFP component annotations to serialize generic files and attach metadata for downstream pipeline steps.
How it connects
Connects generic Artifact with Dataset, Model, and Metrics in a validation pipeline.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.