1

I am trying to run https://github.com/Prediction-Machines/Trading-Brain/blob/master/examples/tf_example.py in PyCharm and keep getting the following error

Traceback (most recent call last):
File "C:/Users/xxx/PycharmProjects/Trading-Brain-master/examples/tf_example.py", line 203, in <module>
main(args)
File "C:/Users/xxx/PycharmProjects/Trading-Brain-master/examples/tf_example.py", line 183, in main
runner = Runner(w, config, saveloc, args.load, sess)
File "C:/Users/xxx/PycharmProjects/Trading-Brain-master/examples/tf_example.py", line 109, in __init__
self.agent = Agent(config, sess, load, self.step_op)
File "C:\Users\xxx\PycharmProjects\Trading-Brain-master\tbrn\agents\tf\tf_agent.py", line 13, in __init__
self.brain = TFBrain(config, sess, load, step_op)
File "C:\Users\xxx\PycharmProjects\Trading-Brain-master\tbrn\brains\tf\tf_brain.py", line 92, in __init__
self.writer = tf.summary.FileWriter('.\logs/%s' % self.model_dir, self.sess.graph)
File "C:\Users\xxx\venv\lib\site-packages\tensorflow\python\summary\writer\writer.py", line 350, in __init__
filename_suffix)
File "C:\Users\xxx\venv\lib\site-packages\tensorflow\python\summary\writer\event_file_writer.py", line 67, in __init__
gfile.MakeDirs(self._logdir)
File "C:\Users\xxx\venv\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 368, in recursive_create_dir
pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status)
File "C:\Users\xxx\venv\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: .\logs/TradingGame/action_size-3/amp_scale-2/batch_size-64/discount-0.99/double_q-True/dueling-True/env_name-TradingGame/ep_end-0.0/ep_end_t-14400/ep_start-1.0/history_length-1/input_size-2; No such file or directory

Process finished with exit code 1

I have tried creating the directory manually but it still gives same error. Any help will be appreciated.

miababy
  • 225
  • 2
  • 16
  • Doesn't the path he tries to create look quite odd to you? For starters it contains both / and \ which I am guessing does not work. Also what do you mean by " gives same error". How are you creating the folder manually? – FlyingTeller Mar 12 '18 at 09:37
  • TF tolerates mixing / and \, I believe the problem is the length of the path itself. Encoding hyperparameters in the path is not the best option when you have that many... – GPhilo Mar 12 '18 at 10:06
  • I' ve solfed this problem. The answer is here: https://stackoverflow.com/a/60448427/9349225 – Victoria Feb 28 '20 at 09:20

0 Answers0