question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named 'stable_baselines.sac/td3' when using Colab

See original GitHub issue

On Colab, when I try to import MlpPolicy from either TD3 or SAC

!pip install stable-baselines

from stable_baselines.sac.policies import MlpPolicy as SAC_MlpPolicy
from stable_baselines.td3.policies import MlpPolicy as TD3_MlpPolicy

I end up with the following error

ModuleNotFoundError: No module named 'stable_baselines.sac'

However I do not get the same issue with from stable_baselines.common.policies import MlpPolicy and have no issues importing the MlpPolicy from sac.policies on my own computer (MacOS)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Danilo-Araujo-Silvacommented, Dec 27, 2020

It looks like the most recent version of “stable-baselines[mpi]” is somehow broken.

I fixed using:

!pip install stable-baselines[mpi]
!pip install stable-baselines --upgrade
1reaction
araffincommented, Sep 3, 2019

Hello, Please upgrade stable-baselines, or install the latest version:

!pip install stable-baselines --upgrade
!pip install stable-baselines==2.7.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'stable_baseline3' even when it is installed ...
I am trying to set up stable baselines 3 in google colab. The document is connected to a local runtime on my pc...
Read more >
master PDF - Stable Baselines3 Documentation
Stable Baselines3 (SB3) is a set of reliable implementations of reinforcement learning algorithms in PyTorch. It is the next major version of ...
Read more >
Examples — Stable Baselines 2.10.3a0 documentation
All the following examples can be executed online using Google colab colab notebooks: ... i) for i in range(num_cpu)]) # Stable Baselines provides...
Read more >
Stable Baselines Documentation - Read the Docs
Stable Baselines is a set of improved implementations of Reinforcement Learning (RL) algorithms based on OpenAI Baselines. Note: Stable- ...
Read more >
Stable Baselines Documentation - Read the Docs
Additional algorithms: SAC and TD3 (+ HER support for DQN, DDPG, SAC and ... examples can be executed online using Google colab notebooks:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found