You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/how-to/metadata/metadata.md
+93Lines changed: 93 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,99 @@ log_metadata(
195
195
)
196
196
```
197
197
198
+
## Bulk Metadata Logging
199
+
200
+
The log_metadata function does not support logging the same metadata for multiple entities of the same type simultaneously. To achieve this, you can use the bulk_log_metadata function:
Note that the bulk_log_metadata function has a slightly different signature compared to log_metadata.
231
+
You can use the Identifier class objects to specify any parameter combination that uniquely identifies an object:
232
+
233
+
* VersionedIdentifier
234
+
* Specify either an id or a combination of name and version.
235
+
* Used for artifact and model versions.
236
+
* PipelineRunIdentifier
237
+
* Specify an id, name, or prefix.
238
+
* StepRunIdentifier
239
+
* Specify an id or a combination of name and a pipeline run identifier.
240
+
241
+
Similar to the log_metadata function, if you are calling bulk_log_metadata from within a step, you can use the infer options to automatically log metadata for the step’s model version or artifacts:
Keep in mind that when using the infer_artifacts option, the bulk_log_metadata function logs metadata to all output artifacts of the step.
261
+
262
+
## Performance improvements hints
263
+
264
+
Both `log_metadata` and `bulk_log_metadata` internally use parameters such as name and version to resolve the actual IDs of entities.
265
+
For example, when you provide an artifact's name and version, the function performs an additional lookup to resolve the artifact version ID.
266
+
267
+
To improve performance, prefer using the entity's ID directly instead of its name, version, or other identifiers whenever possible.
268
+
269
+
## Using the client directly
270
+
271
+
If the `log_metadata` or `bulk_log_metadata` functions are too restrictive for your use case, you can use the ZenML Client directly to create run metadata for resources:
0 commit comments