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

No module named 'dopamine.labs.redo #221

Open
Caesar107 opened this issue Sep 4, 2024 · 1 comment
Open

No module named 'dopamine.labs.redo #221

Caesar107 opened this issue Sep 4, 2024 · 1 comment

Comments

@Caesar107
Copy link

Hello,

I encountered an issue when running the Dopamine framework where the module dopamine.labs.redo cannot be found. Below are the details:

Problem:

While trying to run the script train.py located in the dopamine/labs/redo/ directory, I get the following error:

ModuleNotFoundError: No module named 'dopamine.labs.redo'

What I have checked:

  • File structure: The redo folder exists within dopamine/labs/ and contains the following files:

    • __init__.py
    • recycled_atari100k_rainbow_agent.py
    • Other related files.
  • Environment:

    • I’m using an Anaconda environment with Python 3.10.
    • I’ve ensured that the project root directory is included in the PYTHONPATH and have also manually added it via sys.path.append().

Steps to reproduce:

  1. Clone the Dopamine repository.
  2. Navigate to dopamine/labs/redo/.
  3. Run train.py.
  4. The error appears indicating that dopamine.labs.redo cannot be found.

Expected behavior:

I expected the script to correctly locate and import dopamine.labs.redo.

Additional notes:

  • Other modules within dopamine.labs (such as dopamine.labs.atari_100k) can be imported without issue.
  • I have checked and there are no typos in the import path.
  • The project structure seems consistent with the Dopamine framework's setup.

Any insights or help with resolving this issue would be greatly appreciated. Thank you in advance!

@Caesar107
Copy link
Author

I was able to resolve it by uninstalling dopamine-rl and reinstalling the project in "editable" mode using the following steps:

  1. Uninstall the dopamine-rl package:

    pip uninstall dopamine-rl
  2. Reinstall the project in editable mode (from the project root directory):

    pip install -e .

The editable mode (-e) ensures that Python links directly to the project files rather than copying them. This allows any local changes to the project files to take immediate effect and ensures the modules are correctly recognized.

After this, the issue with ModuleNotFoundError: No module named 'dopamine.labs.redo' was resolved, and everything worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant