hugocen/freqtrade-gym

No results

matteomolino opened this issue · 5 comments

Hi
After running the RL model I get a zip file called model.zip and a folder called Tensorboard, however, when I open the model.zip the text files have no results and I cannot figure out why this happens, please see below:

When I open parameter_list I see this:
[
"model/pi_fc0/w:0",
"model/pi_fc0/b:0",
"model/vf_fc0/w:0",
"model/vf_fc0/b:0",
"model/pi_fc1/w:0",
"model/pi_fc1/b:0",
"model/vf_fc1/w:0",
"model/vf_fc1/b:0",
"model/vf/w:0",
"model/vf/b:0",
"model/pi/w:0",
"model/pi/b:0",
"model/q/w:0",
"model/q/b:0"
]

and I cannot see the results... is this because of any package incompatibility? I'm using Python 3.6, Tensorflow and tensorboard 1.14.0, numpy 1.19.4, and the most recent freqtrade version. Thanks very much in advance for your help and excellent work :-)

:~/$ tensorboard --logdir ./tensorboard
Traceback (most recent call last):
File "/home/frequi/.local/bin/tensorboard", line 7, in
from tensorboard.main import run_main
File "/home/frequi/.local/lib/python3.6/site-packages/tensorboard/main.py", line 40, in
from tensorboard import default
File "/home/frequi/.local/lib/python3.6/site-packages/tensorboard/default.py", line 38, in
from tensorboard.plugins.audio import audio_plugin
File "/home/frequi/.local/lib/python3.6/site-packages/tensorboard/plugins/audio/audio_plugin.py", line 30, in
from tensorboard.util import tensor_util
File "/home/frequi/.local/lib/python3.6/site-packages/tensorboard/util/tensor_util.py", line 20, in
import numpy as np
File "/home/frequi/.local/lib/python3.6/site-packages/numpy/init.py", line 140, in
from . import core
File "/home/frequi/.local/lib/python3.6/site-packages/numpy/core/init.py", line 68, in
raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/home/frequi/.local/lib/python3.6/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

The zip file is the trained model.
I am working on a strategy to load the trained model for backtesting and real trading.

Base on the tensorboard error message.
You can try reinstall your numpy package to see if it will help.

Okay thanks. I will re-install everything to see what happens 🥇

I updated the repo.
It now comes with a LoadRLModel strategy.
You can try it with your trained model.

Have fun!

It seems this is based on tensorflow 1.5.x?
Do you know how to get this working on 2.0? tensorflow 1.5 is not compatible with python 3 if I got it correct.

/LoadRLModel.py due to 'No module named 'tensorflow.contrib''

Yes, the sample are using stable-baselines which is based on tensorflow 1.5.x.
It got a newer version you can check out and replace the package.
But the new version lacks some features like full support of multi-processing.
So I am currently not using it.