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
* init
* mypy
* update sorting behavious
* fix display order sorting
* fixes
* few more fixes
* fix endpoint
* fix
* docstring
* add migrations file
* mypy
* Update visualization parameters to disable metadata and resources
This change sets the `include_metadata` and `include_resources` parameters to `False` in the `visualization.to_model` method call within the `DeploymentSchema` class. This adjustment ensures that unnecessary metadata and resources are not included in the visualizations.
No functional changes are expected as a result of this update.
* curated visualizations
* more fixes
* review fix and adding size
* revert deloyment
* add other schema support
* Rename 'size' to 'layout_size' in visualizations
This change updates the terminology used in the codebase to improve clarity and consistency. The parameter 'size' has been renamed to 'layout_size' across various files, including the client, schemas, and documentation, to better reflect its purpose in defining the layout of visualizations.
Additionally, tests have been updated to assert the new 'layout_size' property.
No functional changes were made; this is purely a refactor for improved readability and maintainability.
* Update src/zenml/models/v2/core/curated_visualization.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/models/v2/core/curated_visualization.py
Co-authored-by: Stefan Nica <[email protected]>
* renaming artifact_vertsion_id
* format
* fix enum
* apply stefan reviews
* delete migration outdated file
* update migration file
* docstring
* docstring
* Update src/zenml/zen_stores/schemas/curated_visualization_schemas.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/zen_stores/schemas/curated_visualization_schemas.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/models/v2/core/curated_visualization.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/models/v2/core/curated_visualization.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/zen_stores/schemas/pipeline_run_schemas.py
Co-authored-by: Stefan Nica <[email protected]>
* final round of review
* docstring
* update migration
* Update src/zenml/zen_server/routers/curated_visualization_endpoints.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/zen_server/routers/curated_visualization_endpoints.py
Co-authored-by: Stefan Nica <[email protected]>
* Update src/zenml/zen_server/routers/curated_visualization_endpoints.py
Co-authored-by: Stefan Nica <[email protected]>
* Update migration file description for visualizations
* renaming of visualisation
* migration
* add model rebuild
* update tests
* Fix schema relationships, docstrings and unit tests.
* More fixes
* Fix visualization update endpoint and move FK sqlite enablement after DB migration
* Clear DB connections post-migration
* Michael review updates
* remove migration file
* add new migration file
* michael second review
* add error handling on display order duplicate
* Add migration for curated visualizations table
This migration introduces a new table `curated_visualization` to store visualizations associated with projects. It includes necessary columns and constraints to ensure data integrity and relationships with existing tables.
* fix order by
* fix docstring
* formatt
* fix migration
* cascade delete
* fix failing test and apply michael last review
* update migration
* Fix foreign key and some other minor changes
* Docstring
* Remove wrong default
---------
Co-authored-by: Stefan Nica <[email protected]>
Co-authored-by: Michael Schuster <[email protected]>
Copy file name to clipboardExpand all lines: docs/book/how-to/artifacts/visualizations.md
+178-1Lines changed: 178 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,183 @@ There are three ways how you can add custom visualizations to the dashboard:
65
65
* If you are already handling HTML, Markdown, CSV or JSON data in one of your steps, you can have them visualized in just a few lines of code by casting them to a [special class](#visualization-via-special-return-types) inside your step.
66
66
* If you want to automatically extract visualizations for all artifacts of a certain data type, you can define type-specific visualization logic by [building a custom materializer](#visualization-via-materializers).
67
67
68
+
### Curated Visualizations Across Resources
69
+
70
+
Curated visualizations let you surface a specific artifact visualization across multiple ZenML resources. Each curated visualization links to exactly one resource—for example, a model performance report that appears on the model detail page, or a deployment health dashboard that shows up in the deployment view.
71
+
72
+
Curated visualizations currently support the following resources:
73
+
74
+
-**Projects** – high-level dashboards and KPIs that summarize the state of a project.
75
+
-**Deployments** – monitoring pages for deployed pipelines.
76
+
-**Models** – evaluation dashboards and health views for registered models.
77
+
-**Pipelines** – reusable visual documentation attached to pipeline definitions.
78
+
-**Pipeline Runs** – detailed diagnostics for specific executions.
79
+
-**Pipeline Snapshots** – configuration/version comparisons for snapshot history.
80
+
81
+
You can create a curated visualization programmatically by linking an artifact visualization to a single resource. Provide the resource identifier and resource type directly when creating the visualization. The example below shows how to create separate visualizations for different resource types:
82
+
83
+
```python
84
+
from uuid importUUID
85
+
86
+
from zenml.client import Client
87
+
from zenml.enums import (
88
+
CuratedVisualizationSize,
89
+
VisualizationResourceTypes,
90
+
)
91
+
92
+
client = Client()
93
+
94
+
# Define the identifiers for the pipeline and run you want to enrich
95
+
pipeline_id = UUID("<PIPELINE_ID>")
96
+
pipeline_run_id = UUID("<PIPELINE_RUN_ID>")
97
+
98
+
# Retrieve the artifact version produced by the evaluation step
After creation, the returned response includes the visualization ID. You can retrieve a specific visualization later with `Client.get_curated_visualization`:
Curated visualizations are tied to their parent resources and automatically surface in the ZenML dashboard wherever those resources appear, so keep track of the IDs returned by `create_curated_visualization` if you need to reference them later.
180
+
181
+
#### Updating curated visualizations
182
+
183
+
Once you've created a curated visualization, you can update its display name, order, or tile size using `Client.update_curated_visualization`:
The optional `display_order` field determines how visualizations are sorted when displayed. Visualizations with lower order values appear first, while those with `None` (the default) appear at the end in creation order.
205
+
206
+
When setting display orders, consider leaving gaps between values (e.g., 10, 20, 30 instead of 1, 2, 3) to make it easier to insert new visualizations later without renumbering everything:
Curated visualizations respect the access permissions of the resource they're linked to. A user can only see a curated visualization if they have read access to the specific resource it targets. If a user lacks permission for the linked resource, the visualization will be hidden from their view.
242
+
243
+
For example, if you create a visualization linked to a specific deployment, only users with read access to that deployment will see the visualization. If you need the same visualization to appear in different contexts with different access controls (e.g., on both a project page and a deployment page), create separate curated visualizations for each resource. This ensures that visualizations never inadvertently expose information from resources a user shouldn't access, while giving you fine-grained control over visibility.
244
+
68
245
### Visualization via Special Return Types
69
246
70
247
If you already have HTML, Markdown, CSV or JSON data available as a string inside your step, you can simply cast them to one of the following types and return them from your step:
@@ -257,4 +434,4 @@ steps:
257
434
258
435
Visualizing artifacts is a powerful way to gain insights from your ML pipelines. ZenML's built-in visualization capabilities make it easy to understand your data and model outputs, identify issues, and communicate results.
259
436
260
-
By leveraging these visualization tools, you can better understand your ML workflows, debug problems more effectively, and make more informed decisions about your models.
437
+
By leveraging these visualization tools, you can better understand your ML workflows, debug problems more effectively, and make more informed decisions about your models.
0 commit comments