ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

get error message "TypeError: __init__() got an unexpected keyword argument 'if_off_policy'"

Open larryzh opened this issue 3 years ago • 1 comments

get error message "TypeError: init() got an unexpected keyword argument 'if_off_policy'" when I try to run eRL_demo_StockTrading.ipynb

larryzh avatar Nov 11 '21 02:11 larryzh

add args.if_off_policy=False if you use on-policy algorithms (PPO, A2C) will fix this bug. add args.if_off_policy=True if you use other DRL algorithms.

We add the a function to automatically set this value, see: https://github.com/AI4Finance-Foundation/ElegantRL/blob/a89aa4f022a151109abc301c78829056710b37d4/elegantrl/train/config.py#L89-L91

Yonv1943 avatar Mar 26 '22 12:03 Yonv1943