Skip to content

fix: error in flowstate on single id & h of 1#284

Merged
AzulGarza merged 1 commit intomainfrom
fix-flowstate-single-id-h1
Jan 13, 2026
Merged

fix: error in flowstate on single id & h of 1#284
AzulGarza merged 1 commit intomainfrom
fix-flowstate-single-id-h1

Conversation

@spolisar
Copy link
Collaborator

@spolisar spolisar commented Jan 9, 2026

Fixes an error that occurred with flowstate when using data with a single id and an h of 1.

The error can be created with the following code.

import nest_asyncio
nest_asyncio.apply()

import pandas as pd

import timecopilot
from timecopilot.models.foundation.flowstate import FlowState

flowstate_model = FlowState()

forecaster = timecopilot.TimeCopilotForecaster(
    models=[
        flowstate_model
    ]
)

flowstate_df = df = pd.read_csv("https://timecopilot.s3.amazonaws.com/public/data/air_passengers.csv",
                                parse_dates=["ds"])
# flowstate_df = pd.read_csv(
#     "https://timecopilot.s3.amazonaws.com/public/data/the_anomaly_tour.csv",
#     parse_dates=["ds"],
# )


forecaster.forecast(
    df=flowstate_df,
    h=1
)

@spolisar spolisar force-pushed the fix-flowstate-single-id-h1 branch from a829d44 to 29863bc Compare January 13, 2026 17:02
@AzulGarza AzulGarza self-requested a review January 13, 2026 18:59
@AzulGarza AzulGarza merged commit c9974f6 into main Jan 13, 2026
17 of 18 checks passed
@AzulGarza AzulGarza deleted the fix-flowstate-single-id-h1 branch January 13, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants