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

ModuleNotFoundError: No module named 'ray.rllib.agents' #18

Open
Quaterion opened this issue Jun 8, 2023 · 4 comments
Open

ModuleNotFoundError: No module named 'ray.rllib.agents' #18

Quaterion opened this issue Jun 8, 2023 · 4 comments

Comments

@Quaterion
Copy link

In tensor-house/supply-chain/supply-chain-reinforcement-learning.ipynb
the code

import ray.rllib.agents.ddpg as ddpg

gives the error

ModuleNotFoundError: No module named 'ray.rllib.agents'

After changing the line to

import ray.rllib.algorithms.ddpg as ddpg

there is still the problem that the config does not work

AttributeError: module 'ray.rllib.algorithms.ddpg' has no attribute 'DEFAULT_CONFIG'

I use
ray version 2.4.0
Python 3.10.9
Ubuntu

@JBOE22175
Copy link

I got the same problem with ray 2.5.1. I even tried to change further parts but got nowhere.
Ray changed a lot of modules. Obviously, the notebooks were created under an older version but it is unclear whcih version will work. The requirement.txt file does not specify any version.
I also tried with versions provided here. Unfortunately, it throws some other errors.
Could you provide version numbers for the required modules. Otherwise, using the notebooks will not work.

@ankithaldar
Copy link

ankithaldar commented Jul 9, 2023

Try ray version 1.13.0 . It was the last version before ray moved to algorithms from agents in rllib.

@lie12huo
Copy link

In ray-2.2.0 , how should I modify the following code:
try:
from ray.rllib.agents.agent import get_agent_class
except ImportError:
from ray.rllib.agents.registry import get_agent_class

@hiepbk
Copy link

hiepbk commented Mar 10, 2024

Try ray version 1.13.0 . It was the last version before ray moved to algorithms from agents in rllib.

Thank you, It's work for me

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

5 participants