Skip to content

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
)

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