Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

KeyErrors when running pipeline test #358

@gussmith23

Description

@gussmith23
WARNING: Logging before flag parsing goes to stderr.
W0729 11:47:31.899429 139645444425536 deprecation_wrapper.py:119] From /home/gus/seq2seq/seq2seq/training/hooks.py:44: The name tf.tr
ain.SessionRunHook is deprecated. Please use tf.estimator.SessionRunHook instead.                                                   

W0729 11:47:31.899979 139645444425536 deprecation_wrapper.py:119] From /home/gus/seq2seq/seq2seq/training/hooks.py:296: The name tf.t
rain.GlobalStepWaiterHook is deprecated. Please use tf.estimator.GlobalStepWaiterHook instead.                                      

sW0729 11:47:32.115276 139645444425536 deprecation.py:323] From /home/gus/seq2seq/seq2seq/test/pipeline_test.py:58: get_or_create_glo
bal_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.            
Instructions for updating:
Please switch to tf.train.get_or_create_global_step
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 921, in format
    if (not FLAGS['showprefixforinfo'].value and
  File "/home/gus/.local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 463, in __getitem__
    return self._flags()[name]
KeyError: 'showprefixforinfo'
Call stack:
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/usr/lib/python3.6/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/python3.6/unittest/main.py", line 256, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/case.py", line 653, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/gus/seq2seq/seq2seq/test/pipeline_test.py", line 78, in test_train_infer
    tf.reset_default_graph()
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 891, in handle
    return self._current_handler.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 825, in emit
    self._log_to_stderr(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 797, in _log_to_stderr
    super(PythonHandler, self).emit(record)
Message: 'From %s: The name %s is deprecated. Please use %s instead.\n'
Arguments: ('/home/gus/seq2seq/seq2seq/test/pipeline_test.py:78', 'tf.reset_default_graph', 'tf.compat.v1.reset_default_graph')
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 921, in format
    if (not FLAGS['showprefixforinfo'].value and
  File "/home/gus/.local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 463, in __getitem__
    return self._flags()[name]
KeyError: 'showprefixforinfo'
Call stack:
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/usr/lib/python3.6/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/python3.6/unittest/main.py", line 256, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/case.py", line 653, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/gus/seq2seq/seq2seq/test/pipeline_test.py", line 107, in test_train_infer
    with gfile.GFile(config_path, "w") as config_file:
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 891, in handle
    return self._current_handler.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 825, in emit
    self._log_to_stderr(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 797, in _log_to_stderr
    super(PythonHandler, self).emit(record)
Message: 'From %s: The name %s is deprecated. Please use %s instead.\n'
Arguments: ('/home/gus/seq2seq/seq2seq/test/pipeline_test.py:107', 'tf.gfile.GFile', 'tf.io.gfile.GFile')
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 921, in format
    if (not FLAGS['showprefixforinfo'].value and
  File "/home/gus/.local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 463, in __getitem__
    return self._flags()[name]
KeyError: 'showprefixforinfo'
Call stack:
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/usr/lib/python3.6/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/python3.6/unittest/main.py", line 256, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/case.py", line 653, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/gus/seq2seq/seq2seq/test/pipeline_test.py", line 148, in test_train_infer
    tf.logging.set_verbosity(tf.logging.INFO)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 891, in handle
    return self._current_handler.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 825, in emit
    self._log_to_stderr(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 797, in _log_to_stderr
    super(PythonHandler, self).emit(record)
Message: 'From %s: The name %s is deprecated. Please use %s instead.\n'
Arguments: ('/home/gus/seq2seq/seq2seq/test/pipeline_test.py:148', 'tf.logging.set_verbosity', 'tf.compat.v1.logging.set_verbosity')
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 921, in format
    if (not FLAGS['showprefixforinfo'].value and
  File "/home/gus/.local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 463, in __getitem__
    return self._flags()[name]
KeyError: 'showprefixforinfo'
Call stack:
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/usr/lib/python3.6/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/python3.6/unittest/main.py", line 256, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.6/unittest/case.py", line 653, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/gus/seq2seq/seq2seq/test/pipeline_test.py", line 148, in test_train_infer
    tf.logging.set_verbosity(tf.logging.INFO)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 891, in handle
    return self._current_handler.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 825, in emit
    self._log_to_stderr(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 797, in _log_to_stderr
    super(PythonHandler, self).emit(record)
Message: 'From %s: The name %s is deprecated. Please use %s instead.\n'
Arguments: ('/home/gus/seq2seq/seq2seq/test/pipeline_test.py:148', 'tf.logging.INFO', 'tf.compat.v1.logging.INFO')
E
======================================================================
ERROR: test_train_infer (seq2seq.test.pipeline_test.PipelineTest)
test_train_infer (seq2seq.test.pipeline_test.PipelineTest)
Tests training and inference scripts.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gus/seq2seq/seq2seq/test/pipeline_test.py", line 149, in test_train_infer
    train_script.main(['--logtostderr'])
  File "/home/gus/seq2seq/bin/train.py", line 237, in main
    tf.logging.info("Loading config from %s", config_path)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation_wrapper.py", line 119, in __getattr__
    _call_location(), full_name, rename)
  File "/home/gus/.local/lib/python3.6/site-packages/tensorflow/python/platform/tf_logging.py", line 166, in warning
    get_logger().warning(msg, *args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 891, in handle
    return self._current_handler.handle(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/home/gus/.local/lib/python3.6/site-packages/absl/logging/__init__.py", line 826, in emit
    elif FLAGS['logtostderr'].value:
  File "/home/gus/.local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 463, in __getitem__
    return self._flags()[name]
KeyError: 'logtostderr'

----------------------------------------------------------------------
Ran 2 tests in 0.278s

FAILED (errors=1, skipped=1)

This occurred after performing the fixes in #68. Seems like default values of flags aren't getting set, somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions