FinRL icon indicating copy to clipboard operation
FinRL copied to clipboard

StockTradingEnv.__init__() got an unexpected keyword argument 'config'

Open valleysprings opened this issue 2 years ago • 5 comments

I means the FinRL/finrl/agents/elegantrl/models.py has been outdate.

initialize the env using env_config is not right at this moment.

image

env-stocktrading environment has been updated quickly and only stable-baseline3 agent is working fine right now.

valleysprings avatar Feb 12 '23 12:02 valleysprings

And another issue is there are some dupilicated codes in preprocessor and data_processors (for example proceesor_yahoofinance and yahoodownloader + preprocessor) and only the latter one is working fine in env-stocktrading environment. Hope these code will get an overhaul soon. Thank you!

valleysprings avatar Feb 12 '23 12:02 valleysprings

elegantRL needs this parameters to init, while stocktradingenv cannot provide these arguments, thus resulting some errors.

image

image

valleysprings avatar Feb 12 '23 13:02 valleysprings

for the record, rllib has the same issue.

valleysprings avatar Feb 12 '23 13:02 valleysprings

a suggestion is to check the importing function. You should import the environment env_stocktrading_np.py instead of env_stocking.py, since the env class defined in the former file has the 'config' attribute.

YSLIU627 avatar Mar 03 '23 23:03 YSLIU627

Yeah, i have tried that. But I encounter other errors regarding to elegantRL. (haven't tried rllib before :)

valleysprings avatar Mar 04 '23 11:03 valleysprings