https://kedro.org/ logo
#questions
Title
# questions
v

Vici

01/18/2023, 9:51 AM
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

Tynan

01/18/2023, 9:55 AM
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

Yetunde

01/18/2023, 9:59 AM
And also, thank you for flagging this @Vici. How did you find experiment tracking in Kedro?
v

Vici

01/18/2023, 10:03 AM
@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

Tynan

01/18/2023, 10:04 AM
it should work. did you kill your Viz process and restart it again?
v

Vici

01/18/2023, 10:17 AM
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

Tynan

01/18/2023, 10:22 AM
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

Vici

01/18/2023, 10:30 AM
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

Tynan

01/18/2023, 10:33 AM
you could do it via an online editor as well
v

Vici

01/18/2023, 10:36 AM
Cool, even better. Do you have any recommendations?
t

Tynan

01/18/2023, 10:40 AM
i think i've used this one before: https://sqliteonline.com/
v

Vici

01/18/2023, 10:49 AM
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

Tynan

01/18/2023, 10:56 AM
first see if you can see all your runs by running this:
SELECT * FROM runs;
v

Vici

01/18/2023, 11:00 AM
Yes, this works fine ๐ŸŽถ
t

Tynan

01/18/2023, 11:01 AM
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

Vici

01/18/2023, 11:02 AM
Beautiful, thank you! Have a great day ๐Ÿ˜€
t

Tynan

01/18/2023, 11:13 AM
you're welcome!
a

Antony Milne

01/18/2023, 11:18 AM
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.