diff --git a/tensorflow_probability/python/experimental/mcmc/covariance_reducer.py b/tensorflow_probability/python/experimental/mcmc/covariance_reducer.py index 4c7eca6d6e..1e5876a554 100644 --- a/tensorflow_probability/python/experimental/mcmc/covariance_reducer.py +++ b/tensorflow_probability/python/experimental/mcmc/covariance_reducer.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import reducer as reducer_base diff --git a/tensorflow_probability/python/experimental/mcmc/covariance_reducer_test.py b/tensorflow_probability/python/experimental/mcmc/covariance_reducer_test.py index f53e788bfc..573fe4bb5e 100644 --- a/tensorflow_probability/python/experimental/mcmc/covariance_reducer_test.py +++ b/tensorflow_probability/python/experimental/mcmc/covariance_reducer_test.py @@ -16,8 +16,6 @@ import collections -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation_test.py b/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation_test.py index 8e270cfdd9..aca4d2bc2b 100644 --- a/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation_test.py +++ b/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation_test.py @@ -16,8 +16,6 @@ import collections -# Dependency imports - from absl.testing import parameterized import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/elliptical_slice_sampler.py b/tensorflow_probability/python/experimental/mcmc/elliptical_slice_sampler.py index 16c8b8f62a..78e22e16f1 100644 --- a/tensorflow_probability/python/experimental/mcmc/elliptical_slice_sampler.py +++ b/tensorflow_probability/python/experimental/mcmc/elliptical_slice_sampler.py @@ -15,8 +15,6 @@ """Elliptic Slice sampler transition kernel.""" import collections -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/expectations_reducer.py b/tensorflow_probability/python/experimental/mcmc/expectations_reducer.py index c712c68a23..60a5056af8 100644 --- a/tensorflow_probability/python/experimental/mcmc/expectations_reducer.py +++ b/tensorflow_probability/python/experimental/mcmc/expectations_reducer.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import reducer as reducer_base diff --git a/tensorflow_probability/python/experimental/mcmc/expectations_reducer_test.py b/tensorflow_probability/python/experimental/mcmc/expectations_reducer_test.py index eca02d86a9..3f823d628e 100644 --- a/tensorflow_probability/python/experimental/mcmc/expectations_reducer_test.py +++ b/tensorflow_probability/python/experimental/mcmc/expectations_reducer_test.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import normal from tensorflow_probability.python.experimental.mcmc import expectations_reducer diff --git a/tensorflow_probability/python/experimental/mcmc/initialization.py b/tensorflow_probability/python/experimental/mcmc/initialization.py index 42b2d817b4..8efccc9151 100644 --- a/tensorflow_probability/python/experimental/mcmc/initialization.py +++ b/tensorflow_probability/python/experimental/mcmc/initialization.py @@ -14,7 +14,6 @@ # ============================================================================ """MCMC initializations.""" -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import bijector diff --git a/tensorflow_probability/python/experimental/mcmc/initialization_test.py b/tensorflow_probability/python/experimental/mcmc/initialization_test.py index f80235b493..788a24b508 100644 --- a/tensorflow_probability/python/experimental/mcmc/initialization_test.py +++ b/tensorflow_probability/python/experimental/mcmc/initialization_test.py @@ -14,7 +14,6 @@ # ============================================================================ """MCMC initialization tests.""" -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import exp diff --git a/tensorflow_probability/python/experimental/mcmc/kernel_outputs.py b/tensorflow_probability/python/experimental/mcmc/kernel_outputs.py index 06b78c20c7..96a09b776f 100644 --- a/tensorflow_probability/python/experimental/mcmc/kernel_outputs.py +++ b/tensorflow_probability/python/experimental/mcmc/kernel_outputs.py @@ -14,7 +14,6 @@ # ============================================================================ """Convenience wrapper around step_kernel outputs.""" -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import tracing_reducer diff --git a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching.py b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching.py index 3fb5b8df36..137b651767 100644 --- a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching.py +++ b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching.py @@ -38,7 +38,6 @@ import collections import functools -# Dependency imports import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_test.py b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_test.py index 065981b698..1a9f537231 100644 --- a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_test.py +++ b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_test.py @@ -16,8 +16,6 @@ import itertools -# Dependency imports - from absl.testing import parameterized import numpy as np import tensorflow.compat.v1 as tf1 diff --git a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_xla_test.py b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_xla_test.py index f4295c9058..0976c6f8ea 100644 --- a/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_xla_test.py +++ b/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_xla_test.py @@ -14,7 +14,6 @@ # ============================================================================ """Tests of the No U-Turn Sampler.""" -# Dependency imports from absl import flags import numpy as np import tensorflow.compat.v1 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/pnuts_test.py b/tensorflow_probability/python/experimental/mcmc/pnuts_test.py index 800870950e..1800ebaecd 100644 --- a/tensorflow_probability/python/experimental/mcmc/pnuts_test.py +++ b/tensorflow_probability/python/experimental/mcmc/pnuts_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/experimental/mcmc/potential_scale_reduction_reducer.py b/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer.py index ee12ee5748..e7c170c89a 100644 --- a/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer.py +++ b/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import reducer as reducer_base diff --git a/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer_test.py b/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer_test.py index 4f536d9550..28f0db41b7 100644 --- a/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer_test.py +++ b/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for PotentialScaleReductionReducer.""" -# Dependency imports - import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc.py b/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc.py index 96cf251d43..8c59757852 100644 --- a/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc.py +++ b/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc.py @@ -15,7 +15,6 @@ """Hamiltonian Monte Carlo, a gradient-based MCMC algorithm.""" import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import preconditioning_utils as pu diff --git a/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc_test.py b/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc_test.py index f7d10560b2..59ea3dfdda 100644 --- a/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc_test.py +++ b/tensorflow_probability/python/experimental/mcmc/preconditioned_hmc_test.py @@ -16,8 +16,6 @@ import collections -# Dependency imports - from absl.testing import parameterized import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py b/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py index be4c03fd1a..eba31ea870 100644 --- a/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py +++ b/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py @@ -14,7 +14,6 @@ # ============================================================================ """`ProgressBarReducer` for showing progress bars.""" -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import reducer as reducer_base diff --git a/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer_test.py b/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer_test.py index d9c1dc10c9..96f4f83f89 100644 --- a/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer_test.py +++ b/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for ProgressBarReducer.""" -# Dependency imports - from tensorflow_probability.python.experimental.mcmc import progress_bar_reducer from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures from tensorflow_probability.python.experimental.mcmc.sample_fold import sample_fold diff --git a/tensorflow_probability/python/experimental/mcmc/run.py b/tensorflow_probability/python/experimental/mcmc/run.py index 6af1834e9f..fd6db3a19d 100644 --- a/tensorflow_probability/python/experimental/mcmc/run.py +++ b/tensorflow_probability/python/experimental/mcmc/run.py @@ -16,8 +16,6 @@ import collections import warnings -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import sample as exp_sample_lib from tensorflow_probability.python.experimental.mcmc import tracing_reducer diff --git a/tensorflow_probability/python/experimental/mcmc/sample.py b/tensorflow_probability/python/experimental/mcmc/sample.py index 455a64a719..88024b2497 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample.py +++ b/tensorflow_probability/python/experimental/mcmc/sample.py @@ -16,8 +16,6 @@ import collections import warnings -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import step from tensorflow_probability.python.experimental.mcmc import tracing_reducer diff --git a/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel.py b/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel.py index ed55b48857..54e994e2be 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import step from tensorflow_probability.python.internal import prefer_static as ps diff --git a/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel_test.py b/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel_test.py index e60a15de7f..4615fd4a81 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel_test.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_discarding_kernel_test.py @@ -14,7 +14,6 @@ # ============================================================================ """Tests for SampleDiscardingKernel TransitionKernel (thinning and burn-in).""" -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/sample_fold.py b/tensorflow_probability/python/experimental/mcmc/sample_fold.py index eb178644c5..d77034e3bd 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_fold.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_fold.py @@ -16,7 +16,6 @@ import warnings -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import sample from tensorflow_probability.python.experimental.mcmc import sample_discarding_kernel diff --git a/tensorflow_probability/python/experimental/mcmc/sample_fold_test.py b/tensorflow_probability/python/experimental/mcmc/sample_fold_test.py index 4b5f27bc42..bd310b4609 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_fold_test.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_fold_test.py @@ -17,7 +17,6 @@ import collections import warnings -# Dependency imports from absl.testing import parameterized import numpy as np diff --git a/tensorflow_probability/python/experimental/mcmc/sample_sequential_monte_carlo_test.py b/tensorflow_probability/python/experimental/mcmc/sample_sequential_monte_carlo_test.py index 6af29acc63..1d964286f3 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_sequential_monte_carlo_test.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_sequential_monte_carlo_test.py @@ -17,7 +17,6 @@ import functools -# Dependency imports from absl.testing import parameterized import numpy as np diff --git a/tensorflow_probability/python/experimental/mcmc/sample_test.py b/tensorflow_probability/python/experimental/mcmc/sample_test.py index 70ab837259..de78ca10f1 100644 --- a/tensorflow_probability/python/experimental/mcmc/sample_test.py +++ b/tensorflow_probability/python/experimental/mcmc/sample_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for high(er) level drivers for streaming MCMC.""" -# Dependency imports - from tensorflow_probability.python.experimental.mcmc import sample from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures from tensorflow_probability.python.internal import samplers diff --git a/tensorflow_probability/python/experimental/mcmc/step.py b/tensorflow_probability/python/experimental/mcmc/step.py index fa3fa3d7b4..fcd4ca6a22 100644 --- a/tensorflow_probability/python/experimental/mcmc/step.py +++ b/tensorflow_probability/python/experimental/mcmc/step.py @@ -15,8 +15,6 @@ """Drivers for streaming reductions framework.""" import warnings -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import loop_util from tensorflow_probability.python.internal import prefer_static as ps diff --git a/tensorflow_probability/python/experimental/mcmc/step_test.py b/tensorflow_probability/python/experimental/mcmc/step_test.py index a889b964a9..94e162b1f8 100644 --- a/tensorflow_probability/python/experimental/mcmc/step_test.py +++ b/tensorflow_probability/python/experimental/mcmc/step_test.py @@ -17,7 +17,6 @@ import collections import warnings -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/thermodynamic_integrals_test.py b/tensorflow_probability/python/experimental/mcmc/thermodynamic_integrals_test.py index dec487449f..16f84afe5b 100644 --- a/tensorflow_probability/python/experimental/mcmc/thermodynamic_integrals_test.py +++ b/tensorflow_probability/python/experimental/mcmc/thermodynamic_integrals_test.py @@ -14,7 +14,6 @@ # ============================================================================ """Tests for thermodynamic integrals.""" -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/thinning_kernel_test.py b/tensorflow_probability/python/experimental/mcmc/thinning_kernel_test.py index 50681ba7a4..e5c3f413ea 100644 --- a/tensorflow_probability/python/experimental/mcmc/thinning_kernel_test.py +++ b/tensorflow_probability/python/experimental/mcmc/thinning_kernel_test.py @@ -14,7 +14,6 @@ # ============================================================================ """Tests for ThinningKernel TransitionKernel.""" -# Dependency imports import numpy as np import tensorflow.compat.v2 as tf diff --git a/tensorflow_probability/python/experimental/mcmc/tracing_reducer.py b/tensorflow_probability/python/experimental/mcmc/tracing_reducer.py index 647bee5486..14ddfbfc98 100644 --- a/tensorflow_probability/python/experimental/mcmc/tracing_reducer.py +++ b/tensorflow_probability/python/experimental/mcmc/tracing_reducer.py @@ -16,7 +16,6 @@ import collections -# Dependency imports import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import reducer as reducer_base diff --git a/tensorflow_probability/python/experimental/mcmc/tracing_reducer_test.py b/tensorflow_probability/python/experimental/mcmc/tracing_reducer_test.py index 82950fa3b2..3be146248f 100644 --- a/tensorflow_probability/python/experimental/mcmc/tracing_reducer_test.py +++ b/tensorflow_probability/python/experimental/mcmc/tracing_reducer_test.py @@ -14,8 +14,6 @@ # ============================================================================ """Tests for TracingReducer.""" -# Dependency imports - import tensorflow.compat.v2 as tf from tensorflow_probability.python.experimental.mcmc import tracing_reducer from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures diff --git a/tensorflow_probability/python/experimental/mcmc/with_reductions_test.py b/tensorflow_probability/python/experimental/mcmc/with_reductions_test.py index 5fde1545b7..952b0295b5 100644 --- a/tensorflow_probability/python/experimental/mcmc/with_reductions_test.py +++ b/tensorflow_probability/python/experimental/mcmc/with_reductions_test.py @@ -14,7 +14,6 @@ # ============================================================================ """Tests for tfp.experimental.mcmc.WithReductions TransitionKernel.""" -# Dependency imports from absl.testing import parameterized import numpy as np