Closed chrishsr closed 1 year ago
Hello, it's hard to say anything as the provided code doesn't allow to reproduce the issue.
Please note that we do not offer tech support for getting RL working for task X. Your best bet is to read the docs for tips in addition to other sources of RL tips.
The following is an automated answer:
as you seem to try to apply RL to stock trading, i also must warn you about it. Here is recommendation from a former professional trader:
Retail trading, retail trading with ML, and retail trading with RL are bad ideas for almost everyone to get involved with.
Seems like it was an issue with hot swapping my card. My drivers seem to not like that I installed a 3080 to train on and a 3090 to game simultaneously. After completely re-installing all graphics drivers, and not gaming while training, the bug seems to have disappeared. Sorry for the inconvenience
🐛 Bug
I'm using the Proximal Policy Optimization (PPO) algorithm to train an agent in an OpenAI gym environment for trading. After training the agent and saving it, I reload it and run simulations, but the results are inconsistent. Specifically, the simulations right after training produce the desired results, but simulations after reloading the saved agent produce vastly different results that are far from the desired outcome. This happens even if I run the same simulation multiple times.
Please note that I cannot upload the environment since it requires several gigabytes of data used by the environment.
I suspect that the issue may be related to some model dependencies that are still in the GPU memory after the training is completed. These dependencies may be cleared only when the program code is terminated and the VS Code instance is closed. Therefore, when I reload the saved agent and run simulations, these dependencies may still be present in the GPU memory and interfere with the agent's behavior.
I'm looking for help understanding why this inconsistency is occurring and how to fix it.
Edit: please change the flair if I picked the wrong one.
To Reproduce
Relevant log output / Error message
No response
System Info
Cuda version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 PyTorch version : 1.13.0+cu117
Checklist