Closed Mahesha999 closed 3 years ago
I do not see how this connects to load
function, unless loading is what breaks the model.
If there is a bug, please post a minimal (and runnable!) code to reproduce it. Otherwise I'd do the good old "it is their fault" and point back to FinRL library, because tests on saving/loading pass in this repository.
NaN
values in Normal
can cause ValueError.
I guess during training, model or policy must be returning NaN
in mean_actions
which eventually passes into Normal
so an exception occurs.
I have the same problem and also there is not any nan value, it gets error from validation data 2019
did anyone found a solution? same problem here. when I increase learning rate to 0.1 training works fine but if I decrease it for example to 0.01 it gives me that error
I had a similar issue with a custom environment. It turns out that I had nan in my observation. here is the wrapper from stable-baselines3 to check where the nan comes from:
from stable_baselines3.common.vec_env import VecCheckNan
env = VecCheckNan(env, raise_exception=True)
also this is a page from the original stable-baselines showing some possible cases that cause this issue: https://stable-baselines.readthedocs.io/en/master/guide/checking_nan.html
Question
I was trying out FinRL library which uses stable-baselines3 under the hood. I encountered below error on
model.load()
(PPO) call. I have asked this question on FinRL here. But didnt get any response there. Possibly because its more related to stable-baselines3 (at least thats what I can deduce by looking at the below stack trace).Can someone give me hint / direction as to what have caused this error?
Checklist