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

[Bug]: Docker tqdm error #1315

Closed
4 tasks done
jaewoo-so opened this issue Feb 6, 2023 · 2 comments · Fixed by #1327
Closed
4 tasks done

[Bug]: Docker tqdm error #1315

jaewoo-so opened this issue Feb 6, 2023 · 2 comments · Fixed by #1327
Labels
bug Something isn't working

Comments

@jaewoo-so
Copy link

🐛 Bug

After install tqdm, model.learn with profress_bar occur ImportError
"model.learn(total_timesteps=int(200), progress_bar=True)"

To Reproduce

import gym
from stable_baselines3 import DQN
from stable_baselines3.common.evaluation import evaluate_policy
from tqdm import tqdm

env = gym.make("LunarLander-v2")
model = DQN("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=int(200), progress_bar=True)

Relevant log output / Error message

Exception has occurred: ImportError
You must install tqdm and rich in order to use the progress bar callback. It is included if you install stable-baselines with the extra packages: `pip install stable-baselines3[extra]`
  File "/home/sjw/lux/sb3_tutorial/basic_train_save_load.py", line 9, in <module>
    model.learn(total_timesteps=int(200), progress_bar=True)
ImportError: You must install tqdm and rich in order to use the progress bar callback. It is included if you install stable-baselines with the extra packages: `pip install stable-baselines3[extra]`

System Info

docker : stablebaselines/stable-baselines3
GPU: RTX 3090
CUDA : 11.7
Python : 3.7.13
PyTorch : 1.11.0
Gym : 0.21.0

Checklist

  • I have checked that there is no similar issue in the repo
  • I have read the documentation
  • I have provided a minimal working example to reproduce the bug
  • I've used the markdown code blocks for both code and stack traces.
@jaewoo-so jaewoo-so added the bug Something isn't working label Feb 6, 2023
@araffin
Copy link
Member

araffin commented Feb 6, 2023

Hello,
thanks for reporting the issue, the docker image is indeed outdated.
Best is to either install tqdm in the container and save a local image (snapshot), or build the image from the repo.

@araffin araffin mentioned this issue Apr 5, 2023
20 tasks
@araffin
Copy link
Member

araffin commented Apr 5, 2023

I've pushed new docker image for #1327, which should solve the issue.

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

Successfully merging a pull request may close this issue.

2 participants