xlnet_extension_tf
xlnet_extension_tf copied to clipboard
TypeError: expected str, bytes or os.PathLike object, not FlagValues
I am trying to execute run_coqa.sh
file with this command:
bash run_coqa.sh \
--gpudevice=0 \
--numgpus=1 \
--taskname=coqa \
--randomseed=100 \
--predicttag=xxxxx \
--modeldir=./model/xlnet_cased_L-24_H-1024_A-16 \
--datadir=./data \
--outputdir=./output_folder \
--numturn=100 \
--seqlen=512 \
--querylen=128 \
--answerlen=128 \
--batchsize=8 \
--learningrate=3e-5 \
--trainsteps=2000 \
--warmupsteps=120 \
--savesteps=500 \
--answerthreshold=128
Then I got this error:
I0819 21:56:00.241106 140032917555008 estimator.py:1147] Done calling model_fn.
INFO:tensorflow:Create CheckpointSaverHook.
I0819 21:56:00.242035 140032917555008 basic_session_run_hooks.py:541] Create CheckpointSaverHook.
Traceback (most recent call last):
File "run_coqa.py", line 1777, in <module>
tf.app.run()
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "run_coqa.py", line 1716, in main
estimator.train(input_fn=train_input_fn, max_steps=FLAGS.train_steps)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py",
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py",
return self._train_model_default(input_fn, hooks, saving_listeners)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py",
saving_listeners)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py",ec
scaffold=estimator_spec.scaffold)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/site-packages/tensorflow/python/training/basic_session_run_hooks.p
self._save_path = os.path.join(checkpoint_dir, checkpoint_basename)
File "/home/huytran/miniconda3/envs/TF/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not FlagValues
execution time was 57 s.
Do you guys know how to solve this?
Is the model in this path ./model/xlnet_cased_L-24_H-1024_A-16
?
@stevezheng23 yes, the model is in this xlnet_extension_tf/model/xlnet_cased_L-24_H-1024_A-16/
folder