facebookresearch / dora

Dora is an experiment management framework. It expresses grid searches as pure python files as part of your repo. It identifies experiments with a unique hash signature. Scale up to hundreds of experiments without losing your sanity.
MIT License
269 stars 24 forks source link

Define Dora `outputs` dir relative to where decorated main is defined #28

Closed louismartin closed 2 years ago

louismartin commented 2 years ago

https://github.com/facebookresearch/dora/blob/7e5d8942189126afbd4cf716b10bbd35aab12fbd/dora/conf.py#L147

My decorated main is in myrepo/mypackage/train.py I launched a grid search from myrepo/ with dora grid ... which created an outputs dir in myrepo/outputs/.

Now I want to analyze my runs programatically from a notebook stored in myrepo/notebooks/mynotebook.ipynb. However if run this in the notebook:

from mypackage.train import main

print(main.dora.dir)

Then it prints

'mypackage/notebooks/outputs'

Hence not the same as where my experiments are stored. Would it make sense to define the dora outputs dir relative to where the decorated main is defined? E.g. when calling the decorator we would set dora.dir as Path(__file__).parent / "outputs" or something.