Describe the bug
Run into an assertionError in Elegantrl-0.3.3-py3.9.egg-->config.py
assert hasattr(self.agent, 'init')
AssertionError
Error message
File "/home/FinRL/FinRL-Library/finrl/agents/elegantrl/models.py", line 87, in train_model
train_and_evaluate(model)
File "/home/FinRL/FinRL-Library/venv/lib/python3.9/site-packages/elegantrl-0.3.3-py3.9.egg/elegantrl/train/run.py", line 15, in train_and_evaluate
args.init_before_training() # necessary!
File "/home/FinRL/FinRL-Library/venv/lib/python3.9/site-packages/elegantrl-0.3.3-py3.9.egg/elegantrl/train/config.py", line 191, in init_before_training
assert hasattr(self.agent, 'init')
AssertionError
The implementation of the initialization doesn't seem to finished yet for elegantrl.
There are multiple issues still.
There is further selection layer needed for concrete implementation of the agents.
MODELS = {"ddpg": AgentDDPG.AgentDDPG(), "td3": AgentTD3.AgentTD3(), "sac": AgentSAC.AgentSAC(), "ppo": AgentPPO.AgentPPO()} in finrl.agents.elegantrl..models.py -temporary fix
Argument class has no argument agent_class, it has to be changed to agent and will only accept an object with members init, explore_env, ...
Describe the bug Run into an assertionError in
Elegantrl-0.3.3-py3.9.egg
-->config.py
assert hasattr(self.agent, 'init') AssertionErrorError message
I suppose this due to update in elegantrl-0.3.3.