Overview
Thebulk_log_metadata() function allows you to log metadata to multiple ZenML resources (steps, artifacts, models) in a single efficient call. This is useful when you need to attach the same metadata to multiple entities.
Signature
Parameters
Dictionary of metadata key-value pairs. Values can be:
- Primitive types:
str,int,float,bool - URI:
Uritype for file/resource references - Structured data:
dict,list
List of ZenML resources to attach metadata to. Each resource specifies:
- Resource type (step, artifact, model)
- Resource identifier (ID or name)
Return Value
This function does not return a value. Metadata is logged to the ZenML server.
Usage Examples
Log Metadata to Multiple Artifacts
Log Training Metadata to Step and Model
When to Use
Use bulk_log_metadata When
- Logging the same metadata to multiple resources
- Attaching experiment metadata to all artifacts
- Tagging multiple entities with common information
- Optimizing metadata logging performance
Use log_metadata When
- Logging to a single resource
- Different metadata for each resource
- Using convenience parameters (infer_model, etc.)
- Simpler use cases
Related Functions
log_metadata
Log metadata to a single resource
log_artifact_metadata
Specialized function for artifact metadata
log_model_metadata
Specialized function for model metadata
log_step_metadata
Specialized function for step metadata
Notes
bulk_log_metadata() is more efficient than calling log_metadata() multiple times when you need to attach the same metadata to multiple resources.All resources must exist in the ZenML database before logging metadata. Use valid IDs or identifiers for each resource.
