Skip to content

Commit

Permalink
Quickstart fixes (#3227)
Browse files Browse the repository at this point in the history
* Replace zenml connect in quickstart

* Linting
  • Loading branch information
schustmi authored Nov 28, 2024
1 parent c107805 commit d16e3a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
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

0 comments on commit d16e3a4

Please sign in to comment.