6c83b47904619bcd2bbb0be73bd76e11598a755a,tensorflow_transform/beam/impl.py,,_assert_tensorflow_version,#,333

Before Change


      // Even if the file doesn"t exist, this session never gets executed we just
      // use it to find out if the string_to_index_table_from_file initializer is
      // compatible with tf.Transform.
      vocabulary_file = tf.constant("__test_file__")
      tf.contrib.lookup.string_to_index_table_from_file(
          vocabulary_file=vocabulary_file)
  except TypeError:
    // Catch the following error from the previous TF version:

After Change


def _assert_tensorflow_version():
  // Fail with a clear error in case we are not using a compatible TF version.
  major, minor, _ = tf.__version__.split(".")
  if int(major) != 1 or int(minor) < 4:
    raise RuntimeError(
        "Tensorflow version >= 1.4, < 2 is required. Found (%s). Please "
        "install the latest 1.x version from "
        "https://github.com/tensorflow/tensorflow. " % tf.__version__)


def _asset_files_supported():
  try:
    _assert_tensorflow_version()
    return True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorflow/transform
Commit Name: 6c83b47904619bcd2bbb0be73bd76e11598a755a
Time: 2017-11-30
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/impl.py
Class Name:
Method Name: _assert_tensorflow_version


Project Name: keras-team/keras
Commit Name: 23e1ad2df7c81bcf89b20225ccf90f815d5e978a
Time: 2016-07-20
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: set_learning_phase


Project Name: reinforceio/tensorforce
Commit Name: 82a059d89d5f5ebc77c6a3f0b8ac4072a3979104
Time: 2018-08-03
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/networks/layer.py
Class Name: Nonlinearity
Method Name: __init__