Skip to content

Commit e283e85

Browse files
SKIP docstring test output for model classes, adjust optuna tuning
1 parent 0e7e7c3 commit e283e85

File tree

13 files changed

+14
-51
lines changed

13 files changed

+14
-51
lines changed

doubleml/did/did.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class DoubleMLDID(LinearScoreMixin, DoubleML):
7171
>>> data = make_did_SZ2020(n_obs=500, return_type='DataFrame')
7272
>>> obj_dml_data = dml.DoubleMLDIDData(data, 'y', 'd')
7373
>>> dml_did_obj = dml.DoubleMLDID(obj_dml_data, ml_g, ml_m)
74-
>>> dml_did_obj.fit().summary
74+
>>> dml_did_obj.fit().summary # doctest: +SKIP
7575
coef std err t P>|t| 2.5 % 97.5 %
7676
d -2.840718 1.760386 -1.613691 0.106595 -6.291011 0.609575
7777

doubleml/did/did_cs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class DoubleMLDIDCS(LinearScoreMixin, DoubleML):
7070
>>> data = make_did_SZ2020(n_obs=500, cross_sectional_data=True, return_type='DataFrame')
7171
>>> obj_dml_data = dml.DoubleMLDIDData(data, 'y', 'd', t_col='t')
7272
>>> dml_did_obj = dml.DoubleMLDIDCS(obj_dml_data, ml_g, ml_m)
73-
>>> dml_did_obj.fit().summary
73+
>>> dml_did_obj.fit().summary # doctest: +SKIP
7474
coef std err t P>|t| 2.5 % 97.5 %
7575
d -4.9944 7.561785 -0.660479 0.508947 -19.815226 9.826426
7676
"""

doubleml/did/did_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class DoubleMLDIDMulti:
140140
... gt_combinations="standard",
141141
... control_group="never_treated",
142142
... )
143-
>>> print(dml_did_obj.fit().summary)
143+
>>> print(dml_did_obj.fit().summary) # doctest: +SKIP
144144
coef std err ... 2.5 % 97.5 %
145145
ATT(2025-03,2025-01,2025-02) -0.797617 0.459617 ... -1.698450 0.103215
146146
ATT(2025-03,2025-02,2025-03) 0.270311 0.456453 ... -0.624320 1.164941

doubleml/double_ml.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from doubleml.utils._checks import _check_external_predictions
1515
from doubleml.utils._estimation import _aggregate_coefs_and_ses, _rmse, _set_external_predictions, _var_est
1616
from doubleml.utils._sensitivity import _compute_sensitivity_bias
17-
from doubleml.utils._tune_optuna import OPTUNA_GLOBAL_SETTING_KEYS, _join_param_spaces, resolve_optuna_cv
17+
from doubleml.utils._tune_optuna import OPTUNA_GLOBAL_SETTING_KEYS, resolve_optuna_cv
1818
from doubleml.utils.gain_statistics import gain_statistics
1919

2020
_implemented_data_backends = ["DoubleMLData", "DoubleMLClusterData", "DoubleMLDIDData", "DoubleMLSSMData", "DoubleMLRDDData"]
@@ -1236,10 +1236,7 @@ def _validate_optuna_param_space(self, ml_param_space):
12361236
final_param_space[param_key] = ml_param_space[learner_name]
12371237
# Override if param_name specific space is provided
12381238
for param_key in [pk for pk in self.params_names if pk in ml_param_space.keys()]:
1239-
if final_param_space[param_key] is None:
1240-
final_param_space[param_key] = ml_param_space[param_key]
1241-
else:
1242-
final_param_space[param_key] = _join_param_spaces(final_param_space[param_key], ml_param_space[param_key])
1239+
final_param_space[param_key] = ml_param_space[param_key]
12431240

12441241
return requested_learners, final_param_space
12451242

doubleml/irm/cvar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class DoubleMLCVAR(LinearScoreMixin, DoubleML):
9898
>>> data = make_irm_data(theta=0.5, n_obs=500, dim_x=20, return_type='DataFrame')
9999
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
100100
>>> dml_cvar_obj = dml.DoubleMLCVAR(obj_dml_data, ml_g, ml_m, treatment=1, quantile=0.5)
101-
>>> dml_cvar_obj.fit().summary
101+
>>> dml_cvar_obj.fit().summary # doctest: +SKIP
102102
coef std err t P>|t| 2.5 % 97.5 %
103103
d 1.588364 0.096616 16.43989 9.909942e-61 1.398999 1.777728
104104

doubleml/irm/iivm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DoubleMLIIVM(LinearScoreMixin, DoubleML):
9696
>>> data = make_iivm_data(theta=0.5, n_obs=1000, dim_x=20, alpha_x=1.0, return_type='DataFrame')
9797
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd', z_cols='z')
9898
>>> dml_iivm_obj = dml.DoubleMLIIVM(obj_dml_data, ml_g, ml_m, ml_r)
99-
>>> dml_iivm_obj.fit().summary
99+
>>> dml_iivm_obj.fit().summary # doctest: +SKIP
100100
coef std err t P>|t| 2.5 % 97.5 %
101101
d 0.362398 0.191578 1.891649 0.058538 -0.013088 0.737884
102102

doubleml/irm/irm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class DoubleMLIRM(LinearScoreMixin, DoubleML):
9797
>>> data = make_irm_data(theta=0.5, n_obs=500, dim_x=20, return_type='DataFrame')
9898
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
9999
>>> dml_irm_obj = dml.DoubleMLIRM(obj_dml_data, ml_g, ml_m)
100-
>>> dml_irm_obj.fit().summary
100+
>>> dml_irm_obj.fit().summary # doctest: +SKIP
101101
coef std err t P>|t| 2.5 % 97.5 %
102102
d 0.371972 0.206802 1.798685 0.072069 -0.033353 0.777297
103103

doubleml/irm/lpq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class DoubleMLLPQ(NonLinearScoreMixin, DoubleML):
100100
>>> data = make_iivm_data(theta=0.5, n_obs=1000, dim_x=20, return_type='DataFrame')
101101
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd', z_cols='z')
102102
>>> dml_lpq_obj = dml.DoubleMLLPQ(obj_dml_data, ml_g, ml_m, treatment=1, quantile=0.5)
103-
>>> dml_lpq_obj.fit().summary
103+
>>> dml_lpq_obj.fit().summary # doctest: +SKIP
104104
coef std err t P>|t| 2.5 % 97.5 %
105105
d 0.217244 0.636453 0.341336 0.73285 -1.03018 1.464668
106106
"""

doubleml/irm/pq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class DoubleMLPQ(NonLinearScoreMixin, DoubleML):
106106
>>> data = make_irm_data(theta=0.5, n_obs=500, dim_x=20, return_type='DataFrame')
107107
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
108108
>>> dml_pq_obj = dml.DoubleMLPQ(obj_dml_data, ml_g, ml_m, treatment=1, quantile=0.5)
109-
>>> dml_pq_obj.fit().summary
109+
>>> dml_pq_obj.fit().summary # doctest: +SKIP
110110
coef std err t P>|t| 2.5 % 97.5 %
111111
d 0.553878 0.149858 3.696011 0.000219 0.260161 0.847595
112112
"""

doubleml/irm/qte.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class DoubleMLQTE(SampleSplittingMixin):
8888
>>> data = make_irm_data(theta=0.5, n_obs=500, dim_x=20, return_type='DataFrame')
8989
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
9090
>>> dml_qte_obj = dml.DoubleMLQTE(obj_dml_data, ml_g, ml_m, quantiles=[0.25, 0.5, 0.75])
91-
>>> dml_qte_obj.fit().summary
91+
>>> dml_qte_obj.fit().summary # doctest: +SKIP
9292
coef std err t P>|t| 2.5 % 97.5 %
9393
0.25 0.274825 0.347310 0.791297 0.428771 -0.405890 0.955541
9494
0.50 0.449150 0.192539 2.332782 0.019660 0.071782 0.826519

0 commit comments

Comments
 (0)