You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df["fold"] = self._get_folds(df)
Traceback (most recent call last):
File "/workspaces/etna/t.py", line 78, in <module>
metrics_df, forecast_df, fold_info_df = pipeline.backtest(
File "/workspaces/etna/etna/pipeline/base.py", line 966, in backtest
self._folds = self._run_all_folds(
File "/workspaces/etna/etna/pipeline/base.py", line 831, in _run_all_folds
pipelines = parallel(
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/parallel.py", line 1085, in __call__
if self.dispatch_one_batch(iterator):
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/parallel.py", line 901, in dispatch_one_batch
self._dispatch(tasks)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/parallel.py", line 819, in _dispatch
job = self._backend.apply_async(batch, callback=cb)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 208, in apply_async
result = ImmediateResult(func)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 597, in __init__
self.results = batch()
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/parallel.py", line 288, in __call__
return [func(*args, **kwargs)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/joblib/parallel.py", line 288, in <listcomp>
return [func(*args, **kwargs)
File "/workspaces/etna/etna/pipeline/base.py", line 678, in _fit_backtest_pipeline
pipeline.fit(ts=ts)
File "/workspaces/etna/etna/pipeline/pipeline.py", line 56, in fit
self.ts.fit_transform(self.transforms)
File "/workspaces/etna/etna/datasets/tsdataset.py", line 200, in fit_transform
transform.fit_transform(self)
File "/workspaces/etna/etna/transforms/base.py", line 145, in fit_transform
return self.fit(ts=ts).transform(ts=ts)
File "/workspaces/etna/etna/transforms/base.py", line 126, in transform
df_transformed = self._transform(df=df)
File "/workspaces/etna/etna/transforms/base.py", line 366, in _transform
seg_df = segment_transform.transform(df[segment])
File "/workspaces/etna/etna/transforms/missing_values/resample.py", line 101, in transform
df[self.out_column] = df[self.in_column].ffill() * df["distribution"]
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/ops/common.py", line 72, in new_method
return method(self, other)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/arraylike.py", line 118, in __mul__
return self._arith_method(other, operator.mul)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/series.py", line 6259, in _arith_method
return base.IndexOpsMixin._arith_method(self, other, op)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/base.py", line 1325, in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/ops/array_ops.py", line 218, in arithmetic_op
res_values = op(left, right)
File "/home/codespace/.cache/pypoetry/virtualenvs/etna-cCDvSR3a-py3.10/lib/python3.10/site-packages/pandas/core/arrays/categorical.py", line 1639, in __array_ufunc__
raise TypeError(
TypeError: Object with dtype category cannot perform the numpy op multiply
Checklist
Bug appears at the latest library version
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
ResampleWithDistributionTransform doesn't work correctly with current behaviour of HolidaysTransform
Expected behavior
Cast columns to numerical types before resampling. It should like in
_SklearnAdapter
.How To Reproduce
Environment
No response
Additional context
Checklist
The text was updated successfully, but these errors were encountered: