I’m trying make a pull-request to pycaret support latest sktime, but i have an error that i can´t fix… i don´t know where is the mistake in the code…
I tried to contact the pycaret and sktime team, but they seem to be too busy to pay attention to me, so I came here to see if there is anyone who can help me solve the problem…
Details:
Pull-request: https://github.com/pycaret/pycaret/pull/4009
Pull-request error: https://github.com/pycaret/pycaret/actions/runs/9665451003/job/26662574185?pr=4009
traceback:
_______________________ test_pipeline_works_exo[ets] _________________________
load_uni_exo_data_target_missing = ( Consumption Income Production Savings Unemployment
0 0.615986 0.972261 -2.452700 4.810312 ...01 -0.1
186 0.729598 0.644701 0.474918 -0.572858 0.0
[187 rows x 5 columns], 'Consumption')
model_name = 'ets'
@pytest.mark.parametrize("model_name", _model_names_for_missing_data)
def test_pipeline_works_exo(load_uni_exo_data_target_missing, model_name):
"""Tests that the pipeline works for various operations for Univariate
forecasting with exogenous variables"""
data, target = load_uni_exo_data_target_missing
exp = TSForecastingExperiment()
FH = 12
exp.setup(
data=data,
target=target,
fh=FH,
numeric_imputation_target="drift",
numeric_imputation_exogenous="drift",
enforce_exogenous=False,
)
assert exp.get_config("y").isna().sum() > 0
assert exp.get_config("X").isna().sum().sum() > 0
assert exp.get_config("y_transformed").isna().sum() == 0
assert exp.get_config("X_transformed").isna().sum().sum() == 0
model = exp.create_model(model_name)
> preds = exp.predict_model(model)
c:Userscelespycaretteststest_time_series_preprocess.py:342:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:Userscelespycaretpycarettime_seriesforecastingoop.py:4576: in predict_model
result = get_predictions_with_intervals(
c:Userscelespycaretpycaretutilstime_seriesforecasting__init__.py:110: in get_predictions_with_intervals
y_pred = forecaster.predict(fh=fh, X=X)
c:Userscelespycaret.venvLibsite-packagessktimeforecastingbase_base.py:448: in predict
y_pred = self._predict(fh=fh, X=X_inner)
c:Userscelespycaret.venvLibsite-packagessktimeforecastingcompose_pipeline.py:533: in _predict
X = self._transform(X=X, y=fh)
c:Userscelespycaret.venvLibsite-packagessktimeforecastingcompose_pipeline.py:705: in _transform
X = transformer.transform(X=X, y=y)
c:Userscelespycaret.venvLibsite-packagessktimetransformationsbase.py:612: in transform
Xt = self._transform(X=X_inner, y=y_inner)
c:Userscelespycaret.venvLibsite-packagessktimetransformationscompose_pipeline.py:313: in _transform
Xt = transformer.transform(X=Xt, y=y)
c:Userscelespycaret.venvLibsite-packagessktimetransformationsbase.py:612: in transform
Xt = self._transform(X=X_inner, y=y_inner)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Imputer(random_state=1797), X = None, y = None
def _transform(self, X, y=None):
"""Transform X and return a transformed version.
private _transform containing the core logic, called from transform
Parameters
----------
X : pd.Series or pd.DataFrame
Data to be transformed
y : ignored argument for interface compatibility
Additional data, e.g., labels for transformation
Returns
-------
X : pd.Series or pd.DataFrame, same type as X
transformed version of X
"""
> X = X.copy()
E AttributeError: 'NoneType' object has no attribute 'copy'
c:Userscelespycaret.venvLibsite-packagessktimetransformationsseriesimpute.py:217: AttributeError ```