kkuette / TradzQAI

Trading environnement for RL agents, backtesting and training.
Apache License 2.0
165 stars 47 forks source link

Exception when running live version #11

Closed oscarberonius closed 5 years ago

oscarberonius commented 5 years ago

I created a config for the PPO agent and trained it on the provided data without problems.

When I run 'python run.py -s live' I get the exception

  File "run.py", line 110, in <module>
    session.loadSession()
  File "/Users/Oscar/Documents/Cryptotrading/Tradz/TradzQAI/core/session/live.py", line 61, in loadSession
    self.initAgent()
  File "/Users/Oscar/Documents/Cryptotrading/Tradz/TradzQAI/core/session/live.py", line 74, in initAgent
    self.agent = self.agent(env=self.env, device=self.device)._get()
  File "/Users/Oscar/Documents/Cryptotrading/Tradz/TradzQAI/agents/PPO.py", line 6, in __init__
    Agent.__init__(self, env=env, device=device)
  File "/Users/Oscar/Documents/Cryptotrading/Tradz/TradzQAI/agents/agent.py", line 24, in __init__
    states=self.env.states,
AttributeError: 'Live_env' object has no attribute 'states'

I made sure my api-key, pass and secret are correct. I am connecting to https://api.pro.coinbase.com as endpoint.

Anything I missed?

kkuette commented 5 years ago

I've not fully fixed the complex layer integration for live session yet, it will be available soon.

kkuette commented 5 years ago

I've fixed the states problem. Still there is a little fix to do, not a big deal, i will do it ASAP.

kkuette commented 5 years ago

I've pushed a fix. Keep me posted if any problem occur.