Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: ts_fit() got an unexpected keyword argument 'component_mask' #1035

Closed
berniwal opened this issue Jun 23, 2022 · 2 comments · Fixed by #1165
Closed

[BUG] TypeError: ts_fit() got an unexpected keyword argument 'component_mask' #1035

berniwal opened this issue Jun 23, 2022 · 2 comments · Fixed by #1165
Labels
bug Something isn't working
Projects

Comments

@berniwal
Copy link

berniwal commented Jun 23, 2022

Describe the bug
If one creates a Timeseries with hierarchy and applies a reconciliator with a fit_transform method (here MinTReconciliator), then it always fail because it does not expect a component_mask input argument. It fails and raises the error:

TypeError: ts_fit() got an unexpected keyword argument 'component_mask'

Calling fit and transform separately works as expected.

To Reproduce

from darts.utils.timeseries_generation import linear_timeseries, constant_timeseries
from darts.dataprocessing.transformers.reconciliation import MinTReconciliator

# Create Dummy Timeseries
series = linear_timeseries(length=3)
series_2 = constant_timeseries(length=3)
stacked_series = series.stack(series_2)

# Define Hierarchy
hierarchy = {'linear': ['constant']}
stacked_series = stacked_series.with_hierarchy(hierarchy)

# Define Reconciliator
reconciler = MinTReconciliator()

# Working Setup
reconciler.fit(stacked_series)
result = reconciler.transform(stacked_series)

# Not Working Setup
result = reconciler.fit_transform(stacked_series)

Expected behavior
Fit Transform works the same as calling fit and transform separately.

System:

  • Python version: 3.7.12
  • Darts Version: 0.20.0
@berniwal berniwal added bug Something isn't working triage Issue waiting for triaging labels Jun 23, 2022
@hrzn
Copy link
Contributor

hrzn commented Aug 23, 2022

Thanks for reporting @berniwal - that is indeed a bug we have to fix.

@hrzn hrzn removed the triage Issue waiting for triaging label Aug 23, 2022
@hrzn hrzn added this to To do in darts via automation Aug 23, 2022
@hrzn hrzn moved this from To do to In progress in darts Aug 23, 2022
@hrzn hrzn moved this from In progress to In review in darts Aug 23, 2022
@hrzn
Copy link
Contributor

hrzn commented Aug 23, 2022

Fix: #1165

darts automation moved this from In review to Done Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
darts
Done
Development

Successfully merging a pull request may close this issue.

2 participants