You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to have the ability to re-run certain experiments. I had an issue where some experiments stopped because of a bug in feature A.
I want to fix the bug rerun those experiments with A from scratch, but without deleting the whole folder that has results of experiments from feature B, C, D. They were unaffected by the bug so it doesn't make sense to clear their results and re-run them.
The text was updated successfully, but these errors were encountered:
import os, dill, shutil
from smallab.file_locations import get_experiment_save_directory
# del_name = expt folder name
def delete_results_from_bad_spec(del_name, bad_spec, bad_val):
specs_to_delete = []
for root, _, files in os.walk(get_experiment_save_directory(del_name)):
for fname in files:
if ".pkl" in fname:
with open(os.path.join(root, fname), "rb") as f:
completed = dill.load(f)
if completed["specification"][bad_spec] == bad_val:
print(f"{root}/{fname} has {bad_spec}={bad_val}. DELETE!")
specs_to_delete.append(root)
shutil.rmtree(root)
print(specs_to_delete)
print("Deleted specs above. make sure to remove these from completed.json")
It would be good to have the ability to re-run certain experiments. I had an issue where some experiments stopped because of a bug in feature A.
I want to fix the bug rerun those experiments with A from scratch, but without deleting the whole folder that has results of experiments from feature B, C, D. They were unaffected by the bug so it doesn't make sense to clear their results and re-run them.
The text was updated successfully, but these errors were encountered: