Skip to content

Instantly share code, notes, and snippets.

@chetanambi
Created August 4, 2020 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chetanambi/e2de18d56a313c3e9b1e95982d76620a to your computer and use it in GitHub Desktop.
Save chetanambi/e2de18d56a313c3e9b1e95982d76620a to your computer and use it in GitHub Desktop.
evaluate
!python3 pegasus/bin/evaluate.py \
-- params=reddit_tifu_long_transformer \
-- param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model,batch_size=1,beam_size=2,beam_alpha=0.6 \
-- model_dir=ckpt/pegasus_ckpt/reddit_tifu/model.ckpt-8000
@akshayrajeev1503
Copy link

I have followed all other steps and are working fine.
but while executing this piece of code getting the following error:
WARNING:tensorflow:From pegasus/bin/evaluate.py:152: The name tf.enable_eager_execution is deprecated. Please use tf.compat.v1.enable_eager_execution instead.

WARNING:tensorflow:From pegasus/bin/evaluate.py:153: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 528, in _assert_validators
validator.verify(self)
File "/usr/local/lib/python3.6/dist-packages/absl/flags/_validators.py", line 82, in verify
raise _exceptions.ValidationError(self.message)
absl.flags._exceptions.ValidationError: Flag --params must have a value other than None.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "pegasus/bin/evaluate.py", line 153, in
tf.app.run(main)
File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 293, in run
flags_parser,
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 362, in _run_init
flags_parser=flags_parser,
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 212, in _register_and_parse_flags_with_usage
args_to_main = flags_parser(original_argv)
File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/platform/app.py", line 31, in _parse_flags_tolerate_undef
return flags.FLAGS(_sys.argv if argv is None else argv, known_only=True)
File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/platform/flags.py", line 112, in call
return self.dict['__wrapped'].call(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 636, in call
self._assert_all_validators()
File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 510, in _assert_all_validators
self._assert_validators(all_validators)
File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 531, in _assert_validators
raise _exceptions.IllegalFlagValueError('%s: %s' % (message, str(e)))
absl.flags._exceptions.IllegalFlagValueError: flag --params=None: Flag --params must have a value other than None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment