-
Notifications
You must be signed in to change notification settings - Fork 113
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
Conditionally move session store and stats file to .viz directory #1915
Conversation
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
…st/spike-viz-folder Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change? how should this release with the change of #1951 in starters?
We need to consider the scenarios below:
- Old Kedro starter user ( i.e. 0.19.0) + kedro-viz 9.2.0
- Old Kedro starter user(i.e. 0.19.0) + kedro-viz 9.1.0 (no change, this is the current sitution)
- New Kedro starter user(i.e. 0.19.7) + Kedro-viz 9.2.0 (it should work nicely)
- New Kedro starter user(ie.. 0.19.7) + old Kedro-viz user (maybe the solution is we need to set a lower bound in the starter
kedro-viz>=9.2.0
?
Other questions I have, I see that path is currently set as .viz
, what happens when viz is not run from the root directory, would it produce the artifact in the correct directory?
Signed-off-by: ravi-kumar-pilla <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
Hi @noklam ,
The changes in this PR will not break anything for the starters. These are defaults that are introduced in-case users do not provide them in settings.py file. I am only concerned with the loss of historic ET data in the below case (might be a minor thing) -
This will create a
The reason for the above error might be because we did not create a parent folder for the default path if the folder does not exist.
Yes, I appended the _find_kedro_project() return value to the path. If you see the code, the returned location is - However lets say the user goes into the sub-directory and has also provided Thank you |
Yes bu
Is this a bug? I don't expect this to happen.
They should have the same behavior, what makes the user define argument different from the default? Maybe we could make this clear that it should be relative to the root directory. In caes user provide an absolute path, then we should respect it and read/create the session.db in the user-defined location. |
We also need some migration documentations. For existing viz user, this PR should not change anything. If they want to move it to For new user - we will pin |
Seems like it. We never got across this because
Yes, we do respect what user is sending. Please have a look at the code in
This seems a bit contradictory to the absolute path you mentioned. You can have a quick look at the code - @property
def location(self) -> str:
"""Returns location of the sqlite_store database"""
if "path" not in settings.SESSION_STORE_ARGS:
kedro_project_path = _find_kedro_project(Path.cwd()) or self._path
return _get_session_path(
f"{kedro_project_path}/{VIZ_SESSION_STORE_ARGS['path']}/session_store.db"
)
return _get_session_path(f"{self._path}/session_store.db") Thank you |
If you mean settings.py does not contain from kedro_viz.integrations.kedro.sqlite_store import SQLiteStore
SESSION_STORE_CLASS = SQLiteStore without mentioning In BaseSessionStore, we have - As I mentioned in this comment we did not had Lets connect if this is not clear. Thank you |
docs/source/experiment_tracking.md
Outdated
@@ -97,6 +97,9 @@ This specifies the creation of the `SQLiteStore` under the `data` subfolder, usi | |||
|
|||
This step is crucial to enable experiment tracking features on Kedro-Viz, as it is the database used to serve all run data to the Kedro-Viz front-end. Once this step is complete, you can either proceed to [set up the tracking datasets](#set-up-experiment-tracking-datasets) or [set up your nodes and pipelines to log metrics](#modify-your-nodes-and-pipelines-to-log-metrics); these two activities are interchangeable, but both should be completed to get a working experiment tracking setup. | |||
|
|||
```{note} | |||
Starting from Kedro-Viz 9.2.0, if the user does not provide `SESSION_STORE_ARGS`, a default directory `.viz` will be created at the root of your Kedro project and will be used for `SQLiteStore`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting from Kedro-Viz 9.2.0, if the user does not provide `SESSION_STORE_ARGS`, a default directory `.viz` will be created at the root of your Kedro project and will be used for `SQLiteStore`. | |
Starting from Kedro-Viz 9.2.0, if the user does not provide `SESSION_STORE_ARGS` in the project settings, a default directory `.viz` will be created at the root of your Kedro project and used for `SQLiteStore`. |
@@ -30,6 +30,10 @@ The next step is optional, but useful to check that all is working. Run the full | |||
kedro run | |||
``` | |||
|
|||
```{note} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't mention dataset stats feature anywhere in the docs, maybe we first briefly describe the feature - what it is and then say from Kedro-viz 9.2.0 stats are saved in .viz folder? something like below?
Kedro-Viz provides stats related to datasets under the metadata panel
(insert image).
These stats are generated by hooks. If you have Kedro-Viz installed and run kedro run, the hooks will generate the stats by default. To disable this, you can disable Kedro-Viz hooks in the settings. Starting from version 9.2.0, Kedro-Viz stats are saved in the .viz folder.
@@ -25,3 +25,6 @@ | |||
"for users with kedro-datasets >= 2.1.0", | |||
}, | |||
} | |||
|
|||
VIZ_SESSION_STORE_ARGS = {"path": ".viz"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just have one VIZ_PATH_ARGS
since both are same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I too thought of this but since both the constants are for different purposes, though they have the same value for now, it would be nice to keep them separate. Lets say we introduce more keys for VIZ_METADATA_ARGS
in future other than path
.
Signed-off-by: ravi-kumar-pilla <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. thanks!
Description
Resolves #1891
Development notes
package/kedro_viz/constants.py
-stats.json
being created under.viz
if they have viz installed and did not disable hooks forkedro-viz
plugin.QA notes
kedro run
by definingSESSION_STORE_ARGS
in your settings.py file.session_store.db
file will be modified/created at the location specified in settings.py file.kedro viz run
should read sessions data for experiment tracking from the location specified abovekedro run
without definingSESSION_STORE_ARGS
in your settings.py file.session_store.db
file will be modified/created at<kedro_project_root>/.viz
directory.kedro viz run
should read sessions data for experiment tracking from<kedro_project_root>/.viz/session_store.db
kedro run
stats.json
file will be created under<kedro_project_root>/.viz
directorykedro viz run
should read data of stats.json from the new directory created aboveNOTE:
session_store.db
file manually to .viz folder in-case they want to removeSESSION_STORE_ARGS
from their settings.py file and would like to have thesession_store.db
file created under.viz
folder for future kedro runs. They can ignore this if they do not wish to either use.viz
folder or do not want historickedro run
details in experiment tracking.Checklist
RELEASE.md
file