Closed Mahdiehdn closed 1 year ago
I have checked my env using the env checker
did you ? what was the output?
I use colab. When I run check_env(env,warn=True) for the first time, the output is:
None
/usr/local/lib/python3.8/dist-packages/stable_baselines3/common/env_checker.py:190: UserWarning: Your observation has an unconventional shape (neither an image, nor a 1D vector). We recommend you to flatten the observation to have only a 1D vector or use a custom policy to properly process the data.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/stable_baselines3/common/env_checker.py:361: UserWarning: We recommend you to use a symmetric and normalized Box action space (range=[-1, 1]) cf https://stable-baselines3.readthedocs.io/en/master/guide/rl_tips.html
warnings.warn(
But when I run the cell again
None
The observations aren’t images, right? If so, why do you want to use a policy based on conv2d layers?
Yes that's right. My data is a time series, I used conv1d layers and now there is no error.
🐛 Bug
Hi, I am trying to add custom policy to code. after the code comes to "learner = PPO('MlpPolicy', env = env_train,policy_kwargs=policy_kwargs, verbose=1).learn(5000)", code have error. Main code is in this link: https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/2-Advance/FinRL_PortfolioAllocation_Explainable_DRL.ipynb
Could any one help? Thanks.
Code example
System Info
({'OS': 'Linux-5.10.147+-x86_64-with-glibc2.29 # 1 SMP Sat Dec 10 16:00:40 UTC 2022', 'Python': '3.8.10', 'Stable-Baselines3': '1.7.0', 'PyTorch': '1.13.1+cu116', 'GPU Enabled': 'True', 'Numpy': '1.22.4', 'Gym': '0.21.0'}, '- OS: Linux-5.10.147+-x86_64-with-glibc2.29 # 1 SMP Sat Dec 10 16:00:40 UTC 2022\n- Python: 3.8.10\n- Stable-Baselines3: 1.7.0\n- PyTorch: 1.13.1+cu116\n- GPU Enabled: True\n- Numpy: 1.22.4\n- Gym: 0.21.0\n')
Checklist