AI4Finance-Foundation / ElegantRL

Massively Parallel Deep Reinforcement Learning. 🔥
https://ai4finance.org
Other
3.66k stars 842 forks source link

import error arguments #263

Open technodee opened 1 year ago

technodee commented 1 year ago

---> 5 from elegantrl.train.run import Arguments 6 from numpy import random as rd 7

ImportError: cannot import name 'Arguments' from 'elegantrl.train.run' (/usr/local/lib/python3.8/dist-packages/elegantrl/train/run.py)

zhumingpassional commented 1 year ago

pls try from elegantrl.train.config import Config

elegantrl is updated recently.

technodee commented 1 year ago

Thanks Ming, seems FinRL needs an update for this. Sent from Yahoo Mail on Android

On Sun, 29 Jan 2023 at 17:50, Ming @.***> wrote:

pls try from elegantrl.train.config import Config

elegantrl is updated recently.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xfocus3 commented 1 year ago

i get the error ImportError: cannot import name 'Arguments' from 'elegantrl.train.config' (/usr/local/lib/python3.10/dist-packages/elegantrl/train/config.py)

here is the full stack trace :

`ImportError Traceback (most recent call last) ~/Demo_MultiCrypto_Trading.ipynb in ----> 1 from agents.elegantrl_models import DRLAgent as DRLAgent_erl 2 from agents.rllib_models import DRLAgent as DRLAgent_rllib 3 from agents.stablebaselines3_models import DRLAgent as DRLAgent_sb3 4 from meta.data_processor import DataProcessor 5

/FinRL-Meta/agents/elegantrl_models.py in 5 from elegantrl.agents import AgentSAC 6 from elegantrl.agents import AgentTD3 ----> 7 from elegantrl.train.config import Arguments 8 from elegantrl.train.run import init_agent 9 from elegantrl.train.run import train_and_evaluate`

zhumingpassional commented 1 year ago

we updated elegantrl these days.

we will update finrl meta in the future.

xfocus3 commented 1 year ago

i did try the Demo_MultiCrypto_Trading.ipynb, but unfortunately, i have the same error. what Demo_MultiCrypto_Trading you are using? did i have to make a change?

Yonv1943 commented 1 year ago

i did try the Demo_MultiCrypto_Trading.ipynb, but unfortunately, i have the same error. what Demo_MultiCrypto_Trading you are using? did i have to make a change?

Could you provide the open source code about Demo_MultiCrypto_Trading.ipynb for me to reproduce this error? Thanks.

https://github.com/AI4Finance-Foundation/FinRL/issues/421 (a similar but different issue)

xfocus3 commented 1 year ago

i did try the Demo_MultiCrypto_Trading.ipynb, but unfortunately, i have the same error. what Demo_MultiCrypto_Trading you are using? did i have to make a change?

Could you provide the open source code about Demo_MultiCrypto_Trading.ipynb for me to reproduce this error? Thanks.

AI4Finance-Foundation/FinRL#421 (a similar but different issue)

this is the exact ipynb file we used : https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/2-Advance/MultiCrypto_Trading.ipynb

we still get : ` ImportError Traceback (most recent call last) in ----> 1 from agents.elegantrl_models import DRLAgent as DRLAgent_erl 2 from agents.rllib_models import DRLAgent as DRLAgent_rllib 3 from agents.stablebaselines3_models import DRLAgent as DRLAgent_sb3 4 from meta.data_processor import DataProcessor 5

/FinRL-Meta/agents/elegantrl_models.py in 5 from elegantrl.agents import AgentSAC 6 from elegantrl.agents import AgentTD3 ----> 7 from elegantrl.train.config import Arguments 8 from elegantrl.train.run import init_agent 9 from elegantrl.train.run import train_and_evaluate

ImportError: cannot import name 'Arguments' from 'elegantrl.train.config' (/usr/local/lib/python3.8/dist-packages/elegantrl/train/config.py)`

xfocus3 commented 1 year ago

the class Arguments is not in elegantrl/train/config.py anymore. so this cause the error : ----> 7 from elegantrl.train.config import Arguments

bardaki commented 1 year ago

Any updates on this? everything broken.

Yonv1943 commented 1 year ago

i did try the Demo_MultiCrypto_Trading.ipynb, but unfortunately, i have the same error. what Demo_MultiCrypto_Trading you are using? did i have to make a change?

Could you provide the open source code about Demo_MultiCrypto_Trading.ipynb for me to reproduce this error? Thanks.

AI4Finance-Foundation/FinRL#421 (a similar but different issue)

this is the exact ipynb file we used : https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/2-Advance/MultiCrypto_Trading.ipynb

we still get : ` ImportError Traceback (most recent call last) in ----> 1 from agents.elegantrl_models import DRLAgent as DRLAgent_erl 2 from agents.rllib_models import DRLAgent as DRLAgent_rllib 3 from agents.stablebaselines3_models import DRLAgent as DRLAgent_sb3 4 from meta.data_processor import DataProcessor 5

/FinRL-Meta/agents/elegantrl_models.py in 5 from elegantrl.agents import AgentSAC 6 from elegantrl.agents import AgentTD3 ----> 7 from elegantrl.train.config import Arguments 8 from elegantrl.train.run import init_agent 9 from elegantrl.train.run import train_and_evaluate

ImportError: cannot import name 'Arguments' from 'elegantrl.train.config' (/usr/local/lib/python3.8/dist-packages/elegantrl/train/config.py)`

OK. I will fix it after updating the PER moudle. https://github.com/AI4Finance-Foundation/ElegantRL/issues/268

JesseLT commented 1 year ago

Come on! fix it! @zhumingpassional