|
60 | 60 | import jax |
61 | 61 | import jax.numpy as jnp |
62 | 62 | from optax._src import base |
| 63 | +from optax._src.deprecations import warn_deprecated_function # pylint: disable=g-importing-member |
63 | 64 |
|
64 | 65 |
|
65 | 66 | CvState = Any |
|
69 | 70 | ControlVariate = tuple[ComputeCv, CvExpectedValue, UpdateCvState] |
70 | 71 |
|
71 | 72 |
|
72 | | -@chex.warn_deprecated_function |
| 73 | +@warn_deprecated_function |
73 | 74 | def control_delta_method( |
74 | 75 | function: Callable[[chex.Array], float], |
75 | 76 | ) -> ControlVariate: |
@@ -143,7 +144,7 @@ def update_state( |
143 | 144 | return delta, expected_value_delta, update_state |
144 | 145 |
|
145 | 146 |
|
146 | | -@chex.warn_deprecated_function |
| 147 | +@warn_deprecated_function |
147 | 148 | def moving_avg_baseline( |
148 | 149 | function: Callable[[chex.Array], float], |
149 | 150 | decay: float = 0.99, |
@@ -217,7 +218,7 @@ def _map(cv, params, samples, state): |
217 | 218 | return jax.vmap(lambda x: cv(params, x, state))(samples) |
218 | 219 |
|
219 | 220 |
|
220 | | -@chex.warn_deprecated_function |
| 221 | +@warn_deprecated_function |
221 | 222 | def control_variates_jacobians( |
222 | 223 | function: Callable[[chex.Array], float], |
223 | 224 | control_variate_from_function: Callable[ |
@@ -366,7 +367,7 @@ def param_fn(x): |
366 | 367 | return jacobians, control_variate_state |
367 | 368 |
|
368 | 369 |
|
369 | | -@chex.warn_deprecated_function |
| 370 | +@warn_deprecated_function |
370 | 371 | def estimate_control_variate_coefficients( |
371 | 372 | function: Callable[[chex.Array], float], |
372 | 373 | control_variate_from_function: Callable[ |
|
0 commit comments