@@ -461,9 +461,7 @@ def _gen_rlearner_model_final(self):
461461 return _FinalWrapper (self ._gen_model_final (), self .fit_cate_intercept , self ._gen_featurizer (), False )
462462
463463 # override only so that we can update the docstring to indicate support for `LinearModelFinalInference`
464- @_deprecate_positional ("X and W should be passed by keyword only. In a future release "
465- "we will disallow passing X and W by position." , ['X' , 'W' ])
466- def fit (self , Y , T , X = None , W = None , * , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
464+ def fit (self , Y , T , * , X = None , W = None , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
467465 cache_values = False , inference = 'auto' ):
468466 """
469467 Estimate the counterfactual model from data, i.e. estimates functions τ(·,·,·), ∂τ(·,·).
@@ -615,9 +613,7 @@ def _gen_model_final(self):
615613 return StatsModelsLinearRegression (fit_intercept = False )
616614
617615 # override only so that we can update the docstring to indicate support for `StatsModelsInference`
618- @_deprecate_positional ("X and W should be passed by keyword only. In a future release "
619- "we will disallow passing X and W by position." , ['X' , 'W' ])
620- def fit (self , Y , T , X = None , W = None , * , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
616+ def fit (self , Y , T , * , X = None , W = None , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
621617 cache_values = False , inference = 'auto' ):
622618 """
623619 Estimate the counterfactual model from data, i.e. estimates functions τ(·,·,·), ∂τ(·,·).
@@ -826,9 +822,7 @@ def _gen_model_final(self):
826822 n_jobs = self .n_jobs ,
827823 random_state = self .random_state )
828824
829- @_deprecate_positional ("X and W should be passed by keyword only. In a future release "
830- "we will disallow passing X and W by position." , ['X' , 'W' ])
831- def fit (self , Y , T , X = None , W = None , * , sample_weight = None , groups = None ,
825+ def fit (self , Y , T , * , X = None , W = None , sample_weight = None , groups = None ,
832826 cache_values = False , inference = 'auto' ):
833827 """
834828 Estimate the counterfactual model from data, i.e. estimates functions τ(·,·,·), ∂τ(·,·).
@@ -1157,9 +1151,7 @@ def _gen_rlearner_model_final(self):
11571151
11581152 # override only so that we can update the docstring to indicate
11591153 # support for `GenericSingleTreatmentModelFinalInference`
1160- @_deprecate_positional ("X and W should be passed by keyword only. In a future release "
1161- "we will disallow passing X and W by position." , ['X' , 'W' ])
1162- def fit (self , Y , T , X = None , W = None , * , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
1154+ def fit (self , Y , T , * , X = None , W = None , sample_weight = None , freq_weight = None , sample_var = None , groups = None ,
11631155 cache_values = False , inference = 'auto' ):
11641156 """
11651157 Estimate the counterfactual model from data, i.e. estimates functions τ(·,·,·), ∂τ(·,·).
0 commit comments