```"{subtype}_model_pipeline.metrics": type: t...
# questions
a
Copy code
"{subtype}_model_pipeline.metrics":
    type: tracking.MetricsDataSet
    filepath: "data/08_reporting/{subtype}_metrics.json"
    versioned: true
I was using above content to display metrics in
catalog.yaml
. But it throws out the following error:
Class 'tracking.JSONDataSet' not found, is this a typo?
What might be the reason for such a behaviour?
a
We changed the dataset names
DataSet
to
Dataset
recently! (Capital S to lower case s). Try changing the entry to
type: tracking.MetricsDataset
!
๐Ÿ‘ 1
a
Thanks.. That was the issue..
๐Ÿ™Œ 1
@Ankita Katiyar Now the files are saving in the
reporting
folder, but while running
kedro viz
UI, nothing is shown in
metrics
tab of
experiment-tracking
window.
a
Which version of Kedro-viz are you on? I think the support for dataset factories was a recent addition. Let me check which version
a
kedro_viz: 9.1.0 Kedro version : v0.19.5
a
Yeah, it was released in 9.0.0 ๐Ÿค” Just to make sure, the project is setup for experiment tracking properly? Thereโ€™s some steps on this docs page -> https://docs.kedro.org/projects/kedro-viz/en/stable/experiment_tracking.html#set-up-the-session-store
a
I have checked that.
Copy code
from kedro_viz.integrations.kedro.sqlite_store import SQLiteStore

SESSION_STORE_CLASS = SQLiteStore
SESSION_STORE_ARGS = {"path": str(Path(__file__).parents[2])}
It is already there in settings.py. But when I checked the db file, metrics were not stored in that one.
Copy code
"{\"project_path\": \"<folder path>", \"session_id\": \"2024-06-13T11.15.06.074Z\", \"cli\": {\"args\": [], \"params\": {\"from_inputs\": [], \"to_outputs\": [], \"from_nodes\": [], \"to_nodes\": [], \"node_names\": [], \"runner\": null, \"is_async\": false, \"env\": null, \"tags\": [], \"load_versions\": {}, \"pipeline\": null, \"namespace\": null, \"config\": null, \"conf_source\": null, \"params\": {}}, \"command_name\": \"run\", \"command_path\": \"kedro run\"}, \"username\": \"athul\", \"git\": {\"commit_sha\": \"13759ce\", \"dirty\": true, \"branch\": \"main\"}}"
Only this data is found inside
session_store.db
file
a
Let me get someone from the viz team to take a look ๐Ÿ‘€
a
Thank you..
r
Hi @Athul R T, Thank you for your patience. I am having a look at it
thankyou 1
Hi @Athul R T, I tried at my end with spaceflights-pandas-viz kedro starter. Followed your catalog entry and modified the data_science pipeline node to output metrics info at -
test_model_pipeline.metrics
Copy code
node(
                func=evaluate_model,
                inputs=["regressor", "X_test", "y_test"],
                name="evaluate_model_node",
                outputs="test_model_pipeline.metrics",
            ),
The metrics information seems to be passed on to UI and displayed. Could you please try re-installing kedro-viz and check again ? Thank you
a
@Ravi Kumar Pilla @Ankita Katiyar I found the issue. Seems kedro-viz is not compatible with the mlflow or I am not using proper type of dataset here.
Copy code
"{subtype}_model_pipeline.metrics":
  type: kedro_mlflow.io.artifacts.MlflowArtifactDataset
  dataset:
    type: tracking.MetricsDataset
    filepath: "data/08_reporting/{subtype}_metrics.json"
    versioned: true
When I stubstituted below code, it worked.
Copy code
"{subtype}_model_pipeline.metrics":
    type: tracking.MetricsDataset
    filepath: "data/08_reporting/{subtype}_metrics.json"
    versioned: true
Anyway let me debug this a bit and I will update you the result.
๐Ÿ‘ 1