Skip to content

Commit 1754188

Browse files
committed
Remove reference to ricardo in tests, use CTS treatment again
1 parent 060897e commit 1754188

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

tests/fixtures/continuous_treatment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
@pytest.fixture
31-
def ricardo_regression_function(rng_key) -> RegressionBuilder:
31+
def cts_treatment_regression_function(rng_key) -> RegressionBuilder:
3232
def _inner(
3333
k_len: int,
3434
z_len: int,

tests/test_integration/test_continuous_treatment.py/test_build_loss_function.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def test_build_loss_function_bad_rhat_shape(
209209
)
210210
def test_build_loss_function_uy_independent_regression_fn(
211211
jax_enable_x64, # noqa: ARG001
212-
ricardo_regression_function,
212+
cts_treatment_regression_function,
213213
uy_independent_mlps,
214214
pytree_allclose,
215215
pytree_all_same_shape,
@@ -232,7 +232,7 @@ def test_build_loss_function_uy_independent_regression_fn(
232232
theta_y_solution = jnp.atleast_1d(theta_y_solution_value)
233233

234234
mlps, r_analytic = uy_independent_mlps(k_len=k_len)
235-
r = ricardo_regression_function(
235+
r = cts_treatment_regression_function(
236236
k_len=k_len,
237237
z_len=z_len,
238238
theta_x=jnp.ones((1,)),
@@ -315,7 +315,7 @@ def test_build_loss_function_uy_independent_regression_fn(
315315
)
316316
def test_build_loss_function_ux_independent_regression_fn(
317317
jax_enable_x64, # noqa: ARG001
318-
ricardo_regression_function,
318+
cts_treatment_regression_function,
319319
ux_independent_mlps,
320320
pytree_allclose,
321321
pytree_all_same_shape,
@@ -348,7 +348,7 @@ def test_build_loss_function_ux_independent_regression_fn(
348348
initial_guess.update(dict.fromkeys(independent_params, 1.0))
349349

350350
mlps, r_analytic = ux_independent_mlps(k_len, n_points, f_y)
351-
r = ricardo_regression_function(
351+
r = cts_treatment_regression_function(
352352
k_len=k_len,
353353
z_len=z_len,
354354
theta_x=0.0,

tests/test_integration/test_continuous_treatment.py/test_regression_function.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def test_fy_independent_of_uy(
99
jax_enable_x64, # noqa: ARG001
10-
ricardo_regression_function,
10+
cts_treatment_regression_function,
1111
vectorise_over_dict_args,
1212
uy_independent_mlps,
1313
k_len: int = 5,
@@ -33,7 +33,7 @@ def test_fy_independent_of_uy(
3333
since enabling x64-precision calculations makes this issue disappear.
3434
"""
3535
mlps, r_analytic = uy_independent_mlps(k_len=k_len)
36-
r = ricardo_regression_function(
36+
r = cts_treatment_regression_function(
3737
k_len=k_len,
3838
z_len=z_len,
3939
theta_x=jnp.ones((1,)),
@@ -79,7 +79,7 @@ def test_fy_independent_of_uy(
7979

8080

8181
def test_uy_independent_of_ux(
82-
ricardo_regression_function,
82+
cts_treatment_regression_function,
8383
ux_independent_mlps,
8484
vectorise_over_dict_args,
8585
k_len: int = 5,
@@ -97,7 +97,7 @@ def test_uy_independent_of_ux(
9797
within numerical precision, of course).
9898
"""
9999
mlps, r_direct_integration = ux_independent_mlps(k_len, n_points, f_y)
100-
r = ricardo_regression_function(
100+
r = cts_treatment_regression_function(
101101
k_len=k_len,
102102
z_len=z_len,
103103
theta_x=0.0,
@@ -125,7 +125,7 @@ def test_uy_independent_of_ux(
125125

126126

127127
def test_regression_correctly_calculates_pi_ul(
128-
ricardo_regression_function,
128+
cts_treatment_regression_function,
129129
k_len: int = 3,
130130
z_len: int = 1,
131131
n_points: int = 10,
@@ -160,7 +160,7 @@ def f_m(_czl: dict, _theta_m):
160160
def f_y(_xuy: dict, _theta_y):
161161
return jnp.asarray(1.0)
162162

163-
r = ricardo_regression_function(
163+
r = cts_treatment_regression_function(
164164
k_len=k_len,
165165
z_len=z_len,
166166
f_ux=f_ux,

0 commit comments

Comments
 (0)