Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to test the whole thing #2

Open
GenesisGupta opened this issue Nov 20, 2018 · 3 comments
Open

not able to test the whole thing #2

GenesisGupta opened this issue Nov 20, 2018 · 3 comments

Comments

@GenesisGupta
Copy link

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'

@miroblog
Copy link
Owner

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

You should create ./info/ directory .

@GenesisGupta
Copy link
Author

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

@miroblog
Copy link
Owner

miroblog commented Nov 24, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants