ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

import error arguments

Open technodee opened this issue 2 years ago • 11 comments

---> 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)

technodee avatar Jan 29 '23 08:01 technodee

pls try from elegantrl.train.config import Config

elegantrl is updated recently.

zhumingpassional avatar Jan 29 '23 12:01 zhumingpassional

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: @.***>

technodee avatar Jan 29 '23 12:01 technodee

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`

xfocus3 avatar Jan 31 '23 15:01 xfocus3

we updated elegantrl these days.

we will update finrl meta in the future.

zhumingpassional avatar Feb 01 '23 01:02 zhumingpassional

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?

xfocus3 avatar Feb 02 '23 08:02 xfocus3

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)

Yonv1943 avatar Feb 02 '23 09:02 Yonv1943

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 avatar Feb 02 '23 12:02 xfocus3

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

xfocus3 avatar Feb 02 '23 12:02 xfocus3

Any updates on this? everything broken.

bardaki avatar Feb 05 '23 07:02 bardaki

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

Yonv1943 avatar Feb 06 '23 01:02 Yonv1943

Come on! fix it! @zhumingpassional

JesseLT avatar Apr 07 '23 14:04 JesseLT