@ptrblck yes. so what I have is 3 scripts for the IDE: agent.py(pytorch model), env.py(physics model) and train.py where I do import the other two classes. in my jupyter notebook i just have 4 cells 1 to import all the modules(torch, numpy…etc) used in the scripts, 1 cell for each script, the only output is the cumulative reward  of each epoch nothing else, that is coming from the train cell.
again no error in the jupyter notebook but it does appear when i run train.py in the IDE.
something that i dont want to do but im thinking is to have just one big script, and see if the error still appear, in each script i just have one class except for the agent script which i have two classes memory buffer and the agent. it could be something related with the data, maybe somewhere i am still no changing the data format and im saving tensors instead of numpy arrays im gonna check that as well.