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

Cannot import name 'hydra_main' from 'dora' on Colab or Kaggle environment #43

Open SebChw opened 1 year ago

SebChw commented 1 year ago

🐛 Bug Report

I wanted to run training inside colab notebook using code that utilizes dora. But after installation hydra_main seems to be missing.

from dora import hydra_main gives me following exception

[<ipython-input-8-0d1fd6af93ab>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from dora import hydra_main

ImportError: cannot import name 'hydra_main' from 'dora' (/usr/local/lib/python3.9/dist-packages/dora/__init__.py)

I installed it with pip install -U dora-search

and tried few different versions.

Your Environment

Both kaggle or colab notebooks.

Or maybe this is expected and one can't use dora inside colab?

SebChw commented 1 year ago

The workaround is to import like that:

from dora.hydra import hydra_main

but It was not that easy to find.

adefossez commented 1 year ago

from dora import hydra should work if hydra is installed. Running ! pip install hydra-core first should make it appear. Do it before you first try importing dora.