chychkan / DeepFaceLab_MacOS

Run DeepFaceLab on MacOS
GNU General Public License v3.0
251 stars 55 forks source link

Bump tensorflow from 2.6.1 to 2.7.0 #56

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps tensorflow from 2.6.1 to 2.7.0.

Release notes

Sourced from tensorflow's releases.

TensorFlow 2.7.0

Release 2.7.0

Breaking Changes

  • tf.keras:

    • The methods Model.fit(), Model.predict(), and Model.evaluate() will no longer uprank input data of shape (batch_size,) to become (batch_size, 1). This enables Model subclasses to process scalar data in their train_step()/test_step()/predict_step() methods.
      Note that this change may break certain subclassed models. You can revert back to the previous behavior by adding upranking yourself in the train_step()/test_step()/predict_step() methods, e.g. if x.shape.rank == 1: x = tf.expand_dims(x, axis=-1). Functional models as well as Sequential models built with an explicit input shape are not affected.
    • The methods Model.to_yaml() and keras.models.model_from_yaml have been replaced to raise a RuntimeError as they can be abused to cause arbitrary code execution. It is recommended to use JSON serialization instead of YAML, or, a better alternative, serialize to H5.
    • LinearModel and WideDeepModel are moved to the tf.compat.v1.keras.models. namespace (tf.compat.v1.keras.models.LinearModel and tf.compat.v1.keras.models.WideDeepModel), and their experimental endpoints (tf.keras.experimental.models.LinearModel and tf.keras.experimental.models.WideDeepModel) are being deprecated.
    • RNG behavior change for all tf.keras.initializers classes. For any class constructed with a fixed seed, it will no longer generate same value when invoked multiple times. Instead, it will return different value, but a determinisitic sequence. This change will make the initialize behavior align between v1 and v2.
  • tf.lite:

    • Rename fields SignatureDef table in schema to maximize the parity with TF SavedModel's Signature concept.
    • Deprecate Makefile builds. Makefile users need to migrate their builds to CMake or Bazel. Please refer to the Build TensorFlow Lite with CMake and Build TensorFlow Lite for ARM boards for the migration.
    • Deprecate tflite::OpResolver::GetDelegates. The list returned by TfLite's BuiltinOpResolver::GetDelegates is now always empty. Instead, recommend using new method tflite::OpResolver::GetDelegateCreators in order to achieve lazy initialization on TfLite delegate instances.
  • TF Core:

    • tf.Graph.get_name_scope() now always returns a string, as documented. Previously, when called within name_scope("") or name_scope(None) contexts, it returned None; now it returns the empty string.
    • tensorflow/core/ir/ contains a new MLIR-based Graph dialect that is isomorphic to GraphDef and will be used to replace GraphDef-based (e.g., Grappler) optimizations.
    • Deprecated and removed attrs() function in shape inference. All attributes should be queried by name now (rather than range returned) to enable changing the underlying storage there.
    • The following Python symbols were accidentally added in earlier versions of TensorFlow and now are removed. Each symbol has a replacement that should be used instead, but note the replacement's argument names are different.
      • tf.quantize_and_dequantize_v4 (accidentally introduced in TensorFlow 2.4): Use tf.quantization.quantize_and_dequantize_v2 instead.
      • tf.batch_mat_mul_v3 (accidentally introduced in TensorFlow 2.6): Use tf.linalg.matmul instead.
      • tf.sparse_segment_sum_grad (accidentally introduced in TensorFlow 2.6): Use tf.raw_ops.SparseSegmentSumGrad instead. Directly calling this op is typically not necessary, as it is automatically used when computing the gradient of tf.sparse.segment_sum.
    • Renaming of tensorflow::int64 to int_64_t in numerous places (the former is an alias for the latter) which could result in needing to regenerate selective op registration headers else execution would fail with unregistered kernels error.
  • Modular File System Migration:

    • Support for S3 and HDFS file systems has been migrated to a modular file systems based approach and is now available in https://github.com/tensorflow/io. The tensorflow-io python package should be installed for S3 and HDFS support with tensorflow.

Major Features and Improvements

  • Improvements to the TensorFlow debugging experience:

    • Previously, TensorFlow error stack traces involved many internal frames, which could be challenging to read through, while not being actionable for end users. As of TF 2.7, TensorFlow filters internal frames in most errors that it raises, to keep stack traces short, readable, and focused on what's actionable for end users (their own code).

      This behavior can be disabled by calling tf.debugging.disable_traceback_filtering(), and can be re-enabled via tf.debugging.enable_traceback_filtering(). If you are debugging a TensorFlow-internal issue (e.g. to prepare a TensorFlow PR), make sure to disable traceback filtering. You can check whether this feature is currently enabled by calling tf.debugging.is_traceback_filtering_enabled().

      Note that this feature is only available with Python 3.7 or higher.

    • Improve the informativeness of error messages raised by Keras Layer.__call__(), by adding the full list of argument values passed to the layer in every exception.

  • Introduce the tf.compat.v1.keras.utils.track_tf1_style_variables decorator, which enables using large classes of tf1-style variable_scope, get_variable, and compat.v1.layer-based components from within TF2 models running with TF2 behavior enabled.

  • tf.data:

    • tf.data service now supports auto-sharding. Users specify the sharding policy with tf.data.experimental.service.ShardingPolicy enum. It can be one of OFF (equivalent to today's "parallel_epochs" mode), DYNAMIC (equivalent to today's "distributed_epoch" mode), or one of the static sharding policies: FILE, DATA, FILE_OR_DATA, or HINT (corresponding to values of tf.data.experimental.AutoShardPolicy).

      Static sharding (auto-sharding) requires the number of tf.data service workers be fixed. Users need to specify the worker addresses in tensorflow.data.experimental.DispatcherConfig.

    • tf.data.experimental.service.register_dataset now accepts optional compression argument.

  • Keras:

... (truncated)

Changelog

Sourced from tensorflow's changelog.

Release 2.7.0

Breaking Changes

  • tf.keras:

    • The methods Model.fit(), Model.predict(), and Model.evaluate() will no longer uprank input data of shape (batch_size,) to become (batch_size, 1). This enables Model subclasses to process scalar data in their train_step()/test_step()/predict_step() methods.
      Note that this change may break certain subclassed models. You can revert back to the previous behavior by adding upranking yourself in the train_step()/test_step()/predict_step() methods, e.g. if x.shape.rank == 1: x = tf.expand_dims(x, axis=-1). Functional models as well as Sequential models built with an explicit input shape are not affected.
    • The methods Model.to_yaml() and keras.models.model_from_yaml have been replaced to raise a RuntimeError as they can be abused to cause arbitrary code execution. It is recommended to use JSON serialization instead of YAML, or, a better alternative, serialize to H5.
    • LinearModel and WideDeepModel are moved to the tf.compat.v1.keras.models. namespace (tf.compat.v1.keras.models.LinearModel and tf.compat.v1.keras.models.WideDeepModel), and their experimental endpoints (tf.keras.experimental.models.LinearModel and tf.keras.experimental.models.WideDeepModel) are being deprecated.
    • RNG behavior change for all tf.keras.initializers classes. For any class constructed with a fixed seed, it will no longer generate same value when invoked multiple times. Instead, it will return different value, but a determinisitic sequence. This change will make the initialize behavior align between v1 and v2.
  • tf.lite:

    • Rename fields SignatureDef table in schema to maximize the parity with TF SavedModel's Signature concept.
    • Deprecate Makefile builds. Makefile users need to migrate their builds to CMake or Bazel. Please refer to the Build TensorFlow Lite with CMake and Build TensorFlow Lite for ARM boards for the migration.
    • Deprecate tflite::OpResolver::GetDelegates. The list returned by TfLite's BuiltinOpResolver::GetDelegates is now always empty. Instead, recommend using new method tflite::OpResolver::GetDelegateCreators in order to achieve lazy initialization on TfLite delegate instances.
  • TF Core:

    • tf.Graph.get_name_scope() now always returns a string, as documented. Previously, when called within name_scope("") or name_scope(None) contexts, it returned None; now it returns the empty string.
    • tensorflow/core/ir/ contains a new MLIR-based Graph dialect that is isomorphic to GraphDef and will be used to replace GraphDef-based (e.g., Grappler) optimizations.
    • Deprecated and removed attrs() function in shape inference. All attributes should be queried by name now (rather than range returned) to enable changing the underlying storage there.
    • The following Python symbols were accidentally added in earlier versions of TensorFlow and now are removed. Each symbol has a replacement that should be used instead, but note the replacement's argument names are different.
      • tf.quantize_and_dequantize_v4 (accidentally introduced in TensorFlow 2.4): Use tf.quantization.quantize_and_dequantize_v2 instead.
      • tf.batch_mat_mul_v3 (accidentally introduced in TensorFlow 2.6): Use tf.linalg.matmul instead.
      • tf.sparse_segment_sum_grad (accidentally introduced in TensorFlow 2.6): Use tf.raw_ops.SparseSegmentSumGrad instead. Directly calling this op is typically not necessary, as it is automatically used when computing the gradient of tf.sparse.segment_sum.
    • Renaming of tensorflow::int64 to int_64_t in numerous places (the former is an alias for the latter) which could result in needing to regenerate selective op registration headers else execution would fail with unregistered kernels error.
  • Modular File System Migration:

    • Support for S3 and HDFS file systems has been migrated to a modular file systems based approach and is now available in https://github.com/tensorflow/io. The tensorflow-io python package should be installed for S3 and HDFS support with tensorflow.

Major Features and Improvements

  • Improvements to the TensorFlow debugging experience:

    • Previously, TensorFlow error stack traces involved many internal frames, which could be challenging to read through, while not being actionable for end users. As of TF 2.7, TensorFlow filters internal frames in most errors that it raises, to keep stack traces short, readable, and focused on what's actionable for end users (their own code).

      This behavior can be disabled by calling tf.debugging.disable_traceback_filtering(), and can be re-enabled via tf.debugging.enable_traceback_filtering(). If you are debugging a TensorFlow-internal issue (e.g. to prepare a TensorFlow PR), make sure to disable traceback filtering. You can check whether this feature is currently enabled by calling tf.debugging.is_traceback_filtering_enabled().

      Note that this feature is only available with Python 3.7 or higher.

    • Improve the informativeness of error messages raised by Keras Layer.__call__(), by adding the full list of argument values passed to the layer in every exception.

  • Introduce the tf.compat.v1.keras.utils.track_tf1_style_variables decorator, which enables using large classes of tf1-style variable_scope, get_variable, and compat.v1.layer-based components from within TF2 models running with TF2 behavior enabled.

  • tf.data:

    • tf.data service now supports auto-sharding. Users specify the sharding policy with tf.data.experimental.service.ShardingPolicy enum. It can be one of OFF (equivalent to today's "parallel_epochs" mode), DYNAMIC (equivalent to today's "distributed_epoch" mode), or one of the static sharding policies: FILE, DATA, FILE_OR_DATA, or HINT (corresponding to values of tf.data.experimental.AutoShardPolicy).

      Static sharding (auto-sharding) requires the number of tf.data service workers be fixed. Users need to specify the worker addresses in tensorflow.data.experimental.DispatcherConfig.

    • tf.data.experimental.service.register_dataset now accepts optional compression argument.

  • Keras:

    • tf.keras.layers.Conv now includes a public convolution_op method. This method can be used to simplify the implementation of Conv subclasses. There are two primary ways to use this new method. The first is to use the method directly in your own call method:

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 2 years ago

Looks like tensorflow is up-to-date now, so this is no longer needed.