Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SebChw opened this issue Apr 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@SebChw
Copy link

SebChw commented Apr 3, 2023

🐛 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 SebChw added the bug Something isn't working label Apr 3, 2023
@SebChw
Copy link
Author

SebChw commented Apr 3, 2023

The workaround is to import like that:

from dora.hydra import hydra_main

but It was not that easy to find.

@adefossez
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants