From 94d967ce5ee801a9e08fc670844a4fd11f17cba1 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 18 Nov 2024 11:39:49 -0800 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 697703603 --- tensorflow_probability/python/mcmc/diagnostic_test.py | 2 -- .../python/mcmc/dual_averaging_step_size_adaptation_test.py | 2 -- tensorflow_probability/python/mcmc/eight_schools_hmc.py | 1 - tensorflow_probability/python/mcmc/hmc_test.py | 2 -- tensorflow_probability/python/mcmc/langevin.py | 2 -- tensorflow_probability/python/mcmc/langevin_test.py | 2 -- tensorflow_probability/python/mcmc/metropolis_hastings_test.py | 1 - tensorflow_probability/python/mcmc/random_walk_metropolis.py | 2 -- .../python/mcmc/random_walk_metropolis_test.py | 2 -- .../python/mcmc/sample_annealed_importance.py | 1 - .../python/mcmc/sample_annealed_importance_test.py | 2 -- .../python/mcmc/sample_halton_sequence_lib.py | 1 - .../python/mcmc/sample_halton_sequence_test.py | 2 -- tensorflow_probability/python/mcmc/sample_test.py | 1 - .../python/mcmc/simple_step_size_adaptation_test.py | 2 -- tensorflow_probability/python/mcmc/slice_sampler_kernel.py | 2 -- tensorflow_probability/python/mcmc/transformed_kernel_test.py | 2 -- 17 files changed, 29 deletions(-) diff --git a/tensorflow_probability/python/mcmc/diagnostic_test.py b/tensorflow_probability/python/mcmc/diagnostic_test.py index 4fff448786..59495c52d0 100644 --- a/tensorflow_probability/python/mcmc/diagnostic_test.py +++ b/tensorflow_probability/python/mcmc/diagnostic_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for MCMC diagnostic utilities.""" -# Dependency imports - import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/dual_averaging_step_size_adaptation_test.py b/tensorflow_probability/python/mcmc/dual_averaging_step_size_adaptation_test.py index 531c75c318..48516a2269 100644 --- a/tensorflow_probability/python/mcmc/dual_averaging_step_size_adaptation_test.py +++ b/tensorflow_probability/python/mcmc/dual_averaging_step_size_adaptation_test.py @@ -17,8 +17,6 @@ import collections import functools -# Dependency imports - from absl.testing import parameterized import numpy as np import tensorflow.compat.v1 as tf1 diff --git a/tensorflow_probability/python/mcmc/eight_schools_hmc.py b/tensorflow_probability/python/mcmc/eight_schools_hmc.py index 587474f6d9..2c900a9c58 100644 --- a/tensorflow_probability/python/mcmc/eight_schools_hmc.py +++ b/tensorflow_probability/python/mcmc/eight_schools_hmc.py @@ -15,7 +15,6 @@ """Shared library for `eight_schools_hmc_{graph,eager}_test.py`.""" import time -# Dependency imports import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/hmc_test.py b/tensorflow_probability/python/mcmc/hmc_test.py index 246e1426bb..d3c10758d8 100644 --- a/tensorflow_probability/python/mcmc/hmc_test.py +++ b/tensorflow_probability/python/mcmc/hmc_test.py @@ -17,8 +17,6 @@ import collections import warnings -# Dependency imports - from absl import logging from absl.testing import parameterized import numpy as np diff --git a/tensorflow_probability/python/mcmc/langevin.py b/tensorflow_probability/python/mcmc/langevin.py index eef3e17240..dc6bd9e419 100644 --- a/tensorflow_probability/python/mcmc/langevin.py +++ b/tensorflow_probability/python/mcmc/langevin.py @@ -15,8 +15,6 @@ """Metropolis-adjusted Langevin algorithm, a gradient-based MCMC algorithm.""" import collections -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import distribute_lib diff --git a/tensorflow_probability/python/mcmc/langevin_test.py b/tensorflow_probability/python/mcmc/langevin_test.py index b47808de77..19f2386562 100644 --- a/tensorflow_probability/python/mcmc/langevin_test.py +++ b/tensorflow_probability/python/mcmc/langevin_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for MetropolisAdjustedLangevinAlgorithm.""" -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import mvn_tril diff --git a/tensorflow_probability/python/mcmc/metropolis_hastings_test.py b/tensorflow_probability/python/mcmc/metropolis_hastings_test.py index 59a2f179af..4b69042867 100644 --- a/tensorflow_probability/python/mcmc/metropolis_hastings_test.py +++ b/tensorflow_probability/python/mcmc/metropolis_hastings_test.py @@ -16,7 +16,6 @@ import collections import warnings -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/random_walk_metropolis.py b/tensorflow_probability/python/mcmc/random_walk_metropolis.py index efd9f2f853..f55350a30d 100644 --- a/tensorflow_probability/python/mcmc/random_walk_metropolis.py +++ b/tensorflow_probability/python/mcmc/random_walk_metropolis.py @@ -15,8 +15,6 @@ """Random Walk Metropolis (RWM) Transition Kernel.""" import collections -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import distribute_lib diff --git a/tensorflow_probability/python/mcmc/random_walk_metropolis_test.py b/tensorflow_probability/python/mcmc/random_walk_metropolis_test.py index 834facbaca..7d23b29224 100644 --- a/tensorflow_probability/python/mcmc/random_walk_metropolis_test.py +++ b/tensorflow_probability/python/mcmc/random_walk_metropolis_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for RandomWalkMetropolis.""" -# Dependency imports - import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/sample_annealed_importance.py b/tensorflow_probability/python/mcmc/sample_annealed_importance.py index c7fb8f4681..2708a1a236 100644 --- a/tensorflow_probability/python/mcmc/sample_annealed_importance.py +++ b/tensorflow_probability/python/mcmc/sample_annealed_importance.py @@ -15,7 +15,6 @@ """Markov chain Monte Carlo driver, `sample_chain_annealed_importance_chain`.""" import collections -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/sample_annealed_importance_test.py b/tensorflow_probability/python/mcmc/sample_annealed_importance_test.py index 72fa9f62e1..b4714bda8b 100644 --- a/tensorflow_probability/python/mcmc/sample_annealed_importance_test.py +++ b/tensorflow_probability/python/mcmc/sample_annealed_importance_test.py @@ -16,8 +16,6 @@ import collections -# Dependency imports - from absl.testing import parameterized import numpy as np import tensorflow.compat.v1 as tf1 diff --git a/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py b/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py index c767ed2fba..472ffb9a0f 100644 --- a/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py +++ b/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py @@ -14,7 +14,6 @@ # ============================================================================ """Quasi Monte Carlo support: Halton sequence.""" -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/sample_halton_sequence_test.py b/tensorflow_probability/python/mcmc/sample_halton_sequence_test.py index 0776dbc5cf..dd3f279aee 100644 --- a/tensorflow_probability/python/mcmc/sample_halton_sequence_test.py +++ b/tensorflow_probability/python/mcmc/sample_halton_sequence_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for sample_halton_sequence_lib.py.""" -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import normal diff --git a/tensorflow_probability/python/mcmc/sample_test.py b/tensorflow_probability/python/mcmc/sample_test.py index 41634a040f..a08f5856fd 100644 --- a/tensorflow_probability/python/mcmc/sample_test.py +++ b/tensorflow_probability/python/mcmc/sample_test.py @@ -17,7 +17,6 @@ import collections import warnings -# Dependency imports from absl.testing import parameterized import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/mcmc/simple_step_size_adaptation_test.py b/tensorflow_probability/python/mcmc/simple_step_size_adaptation_test.py index 02c9364bb5..6c64dd2a3b 100644 --- a/tensorflow_probability/python/mcmc/simple_step_size_adaptation_test.py +++ b/tensorflow_probability/python/mcmc/simple_step_size_adaptation_test.py @@ -17,8 +17,6 @@ import collections import functools -# Dependency imports - from absl.testing import parameterized import numpy as np import tensorflow.compat.v1 as tf1 diff --git a/tensorflow_probability/python/mcmc/slice_sampler_kernel.py b/tensorflow_probability/python/mcmc/slice_sampler_kernel.py index cb849c87e2..ecce833774 100644 --- a/tensorflow_probability/python/mcmc/slice_sampler_kernel.py +++ b/tensorflow_probability/python/mcmc/slice_sampler_kernel.py @@ -15,8 +15,6 @@ """Slice sampler transition kernel.""" import collections -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import distribute_lib diff --git a/tensorflow_probability/python/mcmc/transformed_kernel_test.py b/tensorflow_probability/python/mcmc/transformed_kernel_test.py index c7f36bc333..276975c02a 100644 --- a/tensorflow_probability/python/mcmc/transformed_kernel_test.py +++ b/tensorflow_probability/python/mcmc/transformed_kernel_test.py @@ -16,8 +16,6 @@ import collections -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import chain as chain_lib