MNESIS : a notebook that runs all of themΒΆ
[ ]:
# %pip install -U -r requirements.txt
[ ]:
from mnesis_boilerplate import datetime
from mnesis_boilerplate import pprint
To purge the unfinished scan entries :
A scan that was interrupted leaves placeholder rows (loss=null, time=0.0) that later runs consider as computed. They are removed here so that 20_MNESIS_scanning-parameters.ipynb recomputes them. This applies to the scans of all batches (every datetag) in cached_data/. The scans that hold a .lock file are skipped (remove_locks=False), as they may still be running in another process. Pass remove_locks=True to also delete the .lock files of interrupted scans,
only when no other scan is running.
[ ]:
from mnesis_boilerplate import purge_unfinished_scans
purge_unfinished_scans(remove_locks=False, dry_run=False)
[ ]:
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
pprint("π Importing: mnesis_boilerplate.py")
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 10_MNESIS_generative-model.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 10_MNESIS_generative-model.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 11_MNESIS_learn-synthetic.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 11_MNESIS_learn-synthetic.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 13_MNESIS_testing-inference.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 13_MNESIS_testing-inference.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 14_MNESIS_testing-noise.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 14_MNESIS_testing-noise.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 15_MNESIS_testing-trigger-duration.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 15_MNESIS_testing-trigger-duration.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 16_MNESIS_testing-trigger-fraction.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 16_MNESIS_testing-trigger-fraction.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 18_MNESIS_learn-periodic.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 18_MNESIS_learn-periodic.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 20_MNESIS_scanning-parameters.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 20_MNESIS_scanning-parameters.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("π Running: 25_MNESIS_optuna.ipynb")
print(f"β±οΈ START: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
%run 25_MNESIS_optuna.ipynb
print(f"β
END: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
[ ]:
pprint("β
All MNESIS notebooks executed successfully!")