FinRL
FinRL copied to clipboard
Missing dependencies in elegantrl/train/config.py and .../run.py *or* Incorrect calls from finrl/agents/elegantrl/models.py
Describe the bug
missing dependencies from running main.py --mode=test with elegantrl demo settings.
File "/usr/local/lib/python3.7/site-packages/finrl/main.py", line 149, in
==> ImportError: cannot import name 'Arguments' from 'elegantrl.train.config' (/usr/local/lib/python3.7/site-packages/elegantrl/train/config.py)
list of missing modules: from elegantrl.train.config import Arguments from elegantrl.train.run import init_agent from elegantrl.train.run import train_and_evaluate
A clear and concise description of what the bug is:
When running main.py in test mode, code executes until calling ...agents/elegantrl/models.py from train.py. ...agents/elegantrl/models.py calls elegantrl.train.config where many arguments and initializers exist, however the referenced imports do not exist and no function/method/class takes the correct parameters from the calls.
Line 84 in agents/elegantrl/models.py referenced call for train_and_evaluate: train_and_evaluate(model) Line 92 in agents/elegantrl/models.py referenced call for Arguments: Arguments(agent_class, env) Line 97 in agents/elegantrl/models.py referenced call for init_agent: init_agent(args, gpu_id)
To Reproduce Steps to reproduce the behavior:
- run main.py in test mode with elegantrl as the defined drl_lib (demo settings)
- See error
Expected behavior ppo analysis
Desktop (please complete the following information):
- OS: macOS Big Sur
- Browser: Chrome
- Version: 11.7.1 (20G918)
Additional context No additional context to provide at this time
same issue occurs!
Does anyone know if the Config class from elegantrl.train.config is supposed to be called and not "Arguments"? The Config class takes in similar parameters and returns almost everything that's being asked of it from finrl.agents.elegantrl. If someone can help me understand what's needed or what it's trying to do, I can either build the Arguments class or append the Config class. I've edited the Config class to work with the call, but I don't know if it's executing as intended.
From what I'm seeing, it's supposed to supply the arguments for each type of model, but I may not be reading it right. Just trying to understand and contribute where possible.