Hi everyone. Due to many "test runs" in order to s...
# questions
v
Hi everyone. Due to many "test runs" in order to see how well plots turn out and the like, I've accumulated a huge number of irrelevant runs in my experiment tracking panel. This makes it much more painful to use. Is there a way to: 1. Delete experiment runs 2. Turn off experiment tracking for an instance of "kedro run", e.g. via some command line argument that I might have missed? This question is kind of related to Reason 9 from this github issue. But I don't know whether a fix exists by now... Thank you!
t
currently, there isn't any way to delete or hide runs. if you don't want them to appear any longer, you could delete the directory/file for those runs. that would eliminate them from experiment tracking
y
And also, thank you for flagging this @Vici. How did you find experiment tracking in Kedro?
v
@Tynan Does that work though? For me, the runs still exist after all the related files have been deleted. I guess the runs are still documented in the session_store.db file. Unfortunately I have no database skills, otherwise I could try to tinker with it.
t
it should work. did you kill your Viz process and restart it again?
v
I've tried so, but the runs still don't disappear. My procedure has been as follows: I copy part of the timestamp (seconds, milliseconds) of the run (as seen in viz) and find the corresponding files/directories via terminal on the root level of the Kedro project:
find . -name *timestamp*
. I delete those files/directories.
An experiment tracking entry is still present after this procedure (see appended picture).
t
ah yes, you're right. the tracking data and plots won't show up, but the metadata will, since that's written to the sqlite DB
๐Ÿ‘๐Ÿฝ 1
to remove that you'd have to remove it from the DB. i can help you write a query that would do that if you'd like?
v
Thank you! Is there anything I need to install in order to run a query at the sqlite DB?
I'm installing an sqlite command line shell and then coming back to you ๐Ÿ˜Š
๐Ÿ‘ 1
t
you could do it via an online editor as well
v
Cool, even better. Do you have any recommendations?
t
i think i've used this one before: https://sqliteonline.com/
v
Cool ๐Ÿ‘. So I have imported the database now (correctly? That I don't know ๐Ÿ˜…). How would I proceed next? (Thanks so much for your help, btw!)
t
first see if you can see all your runs by running this:
SELECT * FROM runs;
v
Yes, this works fine ๐ŸŽถ
t
great. then you should choose a date from which you want to delete runs from, and then run this:
Copy code
DELETE from runs WHERE id < "YOUR TIMESTAMP HERE";
then if you save the table and it exists in the same file location, kill your Viz process, start it again, and the runs should be gone
v
Beautiful, thank you! Have a great day ๐Ÿ˜€
t
you're welcome!
a
If you want to turn experiment tracking on/off now that youโ€™ve cleaned up your database, you could do something like this: 1. Define some environment variable, say
DISABLE_KEDRO_EXPERIMENT_TRACKING
2. Wrap the code that uses
SQLiteSessionStore
in your settings.py in
if os.environ.get("DISABLE_KEDRO_EXPERIMENT_TRACKING")
This wonโ€™t prevent the datasets from being written but it will stop the runs being written to the db and hence from appearing on the experiment tracking screen.