tf_deep_rl_trader icon indicating copy to clipboard operation
tf_deep_rl_trader copied to clipboard

not able to test the whole thing

Open GenesisGupta opened this issue 6 years ago • 3 comments

Traceback (most recent call last): File "ppo_trader.py", line 134, in main() File "ppo_trader.py", line 131, in main test_runner.run(num_episodes=1, deterministic=True, testing=True, episode_finished=print_simple_log) File "/home/kedarnath/anaconda3/envs/DeepRLTrader/lib/python3.6/site-packages/tensorforce/execution/runner.py", line 104, in run state, terminal, step_reward = self.environment.execute(action=action) File "/home/kedarnath/Desktop/tf_deep_rl_trader-master/tf_deep_rl_trader-master/env/gymWrapper.py", line 69, in execute state, reward, terminal, _ = self.gym.step(action) File "/home/kedarnath/Desktop/tf_deep_rl_trader-master/tf_deep_rl_trader-master/env/TFTraderEnv.py", line 82, in step s, r, d, i = self._step(action) File "/home/kedarnath/Desktop/tf_deep_rl_trader-master/tf_deep_rl_trader-master/env/TFTraderEnv.py", line 156, in _step self.n_short)) FileNotFoundError: [Errno 2] No such file or directory: './info/ppo_1579793.4444944328_LS_0_0.info'

GenesisGupta avatar Nov 20 '18 13:11 GenesisGupta

FileNotFoundError: [Errno 2] No such file or directory: './info/ppo_1579793.4444944328_LS_0_0.info'

You should create ./info/ directory .

miroblog avatar Nov 21 '18 17:11 miroblog

Hi , with respect to info , i would like to know if this is results from the test run or the train run ?

GenesisGupta avatar Nov 23 '18 15:11 GenesisGupta

below callback function is called after the training, so it's the result from the train run.

def episode_finished(r):
    reward = "%.6f" % (r.episode_rewards[-1])
    print("Finished episode {ep} after {ts} timesteps (reward: {reward})".format(ep=r.episode, ts=r.episode_timestep,
                                                                                 reward=reward))
    if np.mean(r.episode_rewards[-1]) > 0 :
        r.agent.save_model(SAVE_DIR, append_timestep=False)
    return True

miroblog avatar Nov 24 '18 02:11 miroblog