Closed ydzdfci closed 2 years ago
Hi @ydzdfci! Did you have git-lfs set up while cloning the askcos-data repository? Most of the models and data are LFS objects. Once you install git-lfs, you can run git lfs pull
in the askcos-data directory to download them. Sorry this isn't mentioned in the readme!
It works. Thanks for your help @mliu49
I followed the instruction on readme. I created anaconda environment from environment.yml and checked the environment includes all packages in requirements.txt I download askcos-data and put in askco-core/askcos/data Then I add the project in PYTHONPATH. (I used to mark personal info here) On CentOS 7, export PYTHONPATH=${PYTHONPATH}: /askcos-core On Windows 10, I used GUI and add the /askcos-core in PATH under the environment variables After I finished steps above I run the command below python askcos/synthetic/evaluation/template_free.py CCCO.CCCN I got error messages below: 2022-03-24 10:35:50.902925: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Out of range: Read less bytes than requested Traceback (most recent call last): File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested [[{{node save/RestoreV2}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "askcos/synthetic/evaluation/template_free.py", line 131, in
scorer = TemplateFreeNeuralNetScorer()
File "askcos/synthetic/evaluation/template_free.py", line 31, in init
self.model = TFFP()
File " /askcos-core/askcos/synthetic/evaluation/rexgen_direct/predict.py", line 11, in init
self.finder.load_model()
File " /askcos-core/askcos/synthetic/evaluation/rexgen_direct/core_wln_global/directcorefinder.py", line 83, in load_model
saver.restore(self.session, model_path)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 1290, in restore
{self.saver_def.filename_tensor_name: save_path})
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
run_metadata)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested
[[node save/RestoreV2 (defined at /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1751) ]]
Original stack trace for 'save/RestoreV2': File "askcos/synthetic/evaluation/template_free.py", line 131, in
scorer = TemplateFreeNeuralNetScorer()
File "askcos/synthetic/evaluation/template_free.py", line 31, in init
self.model = TFFP()
File " /askcos-core/askcos/synthetic/evaluation/rexgen_direct/predict.py", line 11, in init
self.finder.load_model()
File " /askcos-core/askcos/synthetic/evaluation/rexgen_direct/core_wln_global/directcorefinder.py", line 82, in load_model
saver = tf.train.Saver()
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 828, in init
self.build()
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 878, in _build
build_restore=build_restore)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_io_ops.py", line 1696, in restore_v2
name=name)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 793, in _apply_op_helper
op_def=op_def)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(args, kwargs)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3360, in create_op
attrs, op_def, compute_device)
File " /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3429, in _create_op_internal
op_def=op_def)
File "*** /anaconda3/envs/askcos/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1751, in init
self._traceback = tf_stack.extract_stack()
Thanks