notadamking / Stock-Trading-Visualization

A simple, yet elegant visualization of our stock trading RL agent environment.
MIT License
213 stars 110 forks source link

error: "ModuleNotFoundError: No module named 'tensorflow.contrib' #4

Open viper7882 opened 4 years ago

viper7882 commented 4 years ago

Wanted to give a heads up to anyone trying to run this. You will need specifically tensorflow==1.14.0 because stablebaselines only supports up until this version (aka breaking module name changes).

For anyone trying to run on Colab, you'll need to run:

pip uninstall tensorflow pip install tensorflow==1.14.0 pip install stable-baselines[mpi]==2.8.0

hill-a/stable-baselines#520

levidehaan commented 3 years ago

you can just install stable-baselines3 which supports TF2.3 you need to use: PPO instead of PPO2 and use it like so

model = PPO('MlpPolicy', env, verbose=1)