Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart fixes #3227

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions examples/quickstart/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"\n",
"assert zenml_server_url\n",
"\n",
"!zenml connect --url $zenml_server_url"
"!zenml login $zenml_server_url"
]
},
{
Expand Down Expand Up @@ -722,14 +722,6 @@
"* If you have questions or feedback... join our [**Slack Community**](https://zenml.io/slack) and become part of the ZenML family!\n",
"* If you want to quickly get started with ZenML, check out [ZenML Pro](https://zenml.io/pro)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c560354d-9e78-4061-aaff-2e6213229911",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
8 changes: 3 additions & 5 deletions src/zenml/materializers/built_in_materializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,9 @@ def save(self, data: Any) -> None:
for entry in metadata:
self.artifact_store.rmtree(entry["path"])
raise e

# save dict type objects to JSON file with JSON visualization type
def save_visualizations(
self, data: Any
) -> Dict[str, "VisualizationType"]:
def save_visualizations(self, data: Any) -> Dict[str, "VisualizationType"]:
"""Save visualizations for the given data.

Args:
Expand All @@ -428,7 +426,7 @@ def save_visualizations(
A dictionary of visualization URIs and their types.
"""
# dict/list type objects are always saved as JSON files
# doesn't work for non-serializable types as they
# doesn't work for non-serializable types as they
# are saved as list of lists in different files
if _is_serializable(data):
return {self.data_path: VisualizationType.JSON}
Expand Down
1 change: 1 addition & 0 deletions src/zenml/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ class MarkdownString(str):
class CSVString(str):
"""Special string class to indicate a CSV string."""


class JSONString(str):
"""Special string class to indicate a JSON string."""
2 changes: 1 addition & 1 deletion src/zenml/utils/visualization_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import json
from typing import TYPE_CHECKING, Optional

from IPython.core.display import HTML, Image, JSON, Markdown, display
from IPython.core.display import HTML, JSON, Image, Markdown, display

from zenml.artifacts.utils import load_artifact_visualization
from zenml.enums import VisualizationType
Expand Down
Loading