google-deepmind / google-deepmind/alphageometry
tensorflow.python.framework.errors_impl.FailedPreconditionError: ag_ckpt_vocab; Is a directory
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 572
- PR merge metrics
- No merged PRs in 30d
Description
`
Traceback (most recent call last):
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/yhpeng/alphageometry/alphageometry.py", line 651, in
app.run(main)
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/home/yhpeng/alphageometry/alphageometry.py", line 637, in main
model = get_lm(_CKPT_PATH.value, _VOCAB_PATH.value)
File "/home/yhpeng/alphageometry/alphageometry.py", line 203, in get_lm
return lm.LanguageModelInference(vocab_path, ckpt_init, mode='beam_search')
File "/home/yhpeng/alphageometry/lm_inference.py", line 81, in __init__
for idx in self.encode_list(['.', ';']):
File "/home/yhpeng/alphageometry/lm_inference.py", line 97, in encode_list
result = [self.vocab.encode(x) for x in inputs_strs]
File "/home/yhpeng/alphageometry/lm_inference.py", line 97, in
result = [self.vocab.encode(x) for x in inputs_strs]
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/seqio/vocabularies.py", line 96, in encode
return self._encode(s)
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/seqio/vocabularies.py", line 455, in _encode
return self.tokenizer.EncodeAsIds(s)
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/seqio/vocabularies.py", line 426, in tokenizer
return self._model_context().tokenizer
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/seqio/vocabularies.py", line 336, in _model_context
self._model = self._load_model(
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/seqio/vocabularies.py", line 361, in _load_model
sp_model = f.read()
File "/home/yhpeng/anaconda3/envs/ag/lib/python3.10/site-packages/tensorflow/python/lib/io/file_io.py", line 121, in read
return self._prepare_value(self._read_buf.read(length))
tensorflow.python.framework.errors_impl.FailedPreconditionError: ag_ckpt_vocab; Is a directory
`
I found this error when I ran following scripts below:
`
`python` -m alphageometry \
--alsologtostderr \
--problems_file=$(pwd)/imo_ag_30.txt \
--problem_name=translated_imo_2022_p4 \
--mode=alphageometry \
"${DDAR_ARGS[@]}" \
"${SEARCH_ARGS[@]}" \
"${LM_ARGS[@]}"
`
I tried to use alphageometry to solve the question in imo_ag_30.txt, but I got the error above. Can someone help me ? Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.