Open Praying opened 1 year ago
I have the same issue. I'm using the scripts from the elegantrl/train directory and the net.py from the elegantrl/agents directory. In net.py the error appears at the build_mlp_net command in the class ActorDiscretePPO(ActorBase) definition, where in the attributes *dims is an int type where dims[int] is expected.
One additional remark, there are several versions of the same class (e.g. Arguments Class in run.py and config.py) and different versions of some scripts in different directories (e.g. net.py in elegantrl dir, elegantrl/tutorial dir and elegnatrl/agents dir or run.py in elegantrl dir, elegantrl/tutorial dir and elegantrl/train dir). Is there any documentation which versions are compatible with eachother ? Is the idea that all scripts in teh same directory should be compatible ?
[1] I noticed it works with an earlier gym version but with additional changes (see point [2] below). Downgrade gym
to version 0.24.0
as follows.
pip3 install gym==0.24.0
[2] Before the train_and_evaluate(args)
in the notebook, add the following
if isinstance(args.net_dim, int):
args.net_dim = np.array([args.net_dim])
print(type(args.net_dim))
While none of these is a permanent solution, it helps you unblock and may help in ultimately fixing the problems in the source code.
I can't seem to find the train_and_evaluate function in https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/3-Practical/FinRL_MultiCrypto_Trading.ipynb
train_and_evaluate() is now gone from train.run module...
Run the FinRL_MultiCrypto_Trading.py got error, please fix it