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

Error continuing training with an existing model #148

Open
smyoder opened this issue Feb 13, 2022 · 3 comments
Open

Error continuing training with an existing model #148

smyoder opened this issue Feb 13, 2022 · 3 comments

Comments

@smyoder
Copy link

smyoder commented Feb 13, 2022

Hello,

Whenever I attempt to continue training a pre-trained model using
python code2vec.py --load <model path> --data <data path> --save <save path>
I get the following error:
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1377, in _do_call return fn(*args) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1360, in _run_fn return self._call_tf_sessionrun(options, feed_dict, fetch_list, File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1453, in _call_tf_sessionrun return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict, tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: : The system cannot find the path specified. ; No such process [[{{node IteratorGetNext_1}}]]

This error occurs both for the pre-trained model available for download here and a model I trained from scratch on my own data using train.sh.

I am running on Windows.

@urialon
Copy link
Collaborator

urialon commented Feb 14, 2022

Hi @smyoder ,
Thank you for your interest in our work!

This indeed sounds like a Windows compatibility issue with file paths.

Is this the full error that you're seeing? If not, can you paste here the full error?

@smyoder
Copy link
Author

smyoder commented Feb 14, 2022

Thanks for your prompt response. Here is the full error.

`Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1375, in _do_call
return fn(*args)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1359, in _run_fn
return self._call_tf_sessionrun(options, feed_dict, fetch_list,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1451, in _call_tf_sessionrun
return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: : The system cannot find the path specified.
; No such process
[[{{node IteratorGetNext_1}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\User<local file path>\code2vec.py", line 23, in
model.train()
File "C:\Users\User<local file path>\tensorflow_model.py", line 95, in train
evaluation_results = self.evaluate()
File "C:\Users\User<local file path>\tensorflow_model.py", line 158, in evaluate
top_words, top_scores, original_names, code_vectors = self.sess.run(
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 967, in run
result = self._run(None, fetches, feed_dict, options_ptr,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1190, in _run
results = self._do_run(handle, final_targets, final_fetches,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1368, in _do_run
return self._do_call(_run_fn, feeds, fetches, targets, options,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1394, in _do_call
raise type(e)(node_def, op, message) # pylint: disable=no-value-for-parameter
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: : The system cannot find the path specified.
; No such process
[[node IteratorGetNext_1 (defined at <local file path>\tensorflow_model.py:122) ]]

Errors may have originated from an input operation.
Input Source operations connected to node IteratorGetNext_1:
IteratorV2_1 (defined at <local file path>\tensorflow_model.py:120)

Original stack trace for 'IteratorGetNext_1':
File "<local file path>\code2vec.py", line 23, in
model.train()
File "<local file path>\tensorflow_model.py", line 95, in train
evaluation_results = self.evaluate()
File "<local file path>\tensorflow_model.py", line 122, in evaluate
input_tensors = input_iterator.get_next()
File "\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\ops\iterator_ops.py", line 416, in get_next
flat_ret = gen_dataset_ops.iterator_get_next(
File "\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\ops\gen_dataset_ops.py", line 2747, in iterator_get_next
_, _, _op, _outputs = _op_def_library._apply_op_helper(
File "\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 748, in _apply_op_helper
op = g._create_op_internal(op_type_name, inputs, dtypes=None,
File "\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\ops.py", line 3561, in _create_op_internal
ret = Operation(
File "\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\ops.py", line 2045, in init
self._traceback = tf_stack.extract_stack_for_node(self._c_op)`

@urialon
Copy link
Collaborator

urialon commented Feb 22, 2022

Hi,
It looks like the data path was not found, or at least, not parsed well on windows.

I suggest running on Linux.
Best,
Uri

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