Repository navigation
feat: forecast time series through the TabPFN API - #467
Draft
eddiebergman-priorlabs wants to merge 6 commits into
Draft
eddiebergman-priorlabs wants to merge 6 commits into
eddiebergman-priorlabs wants to merge 6 commits into
Conversation
`tabpfn_client.timeseries.forecast()` checks the structure of the request against the limits in `get_settings().forecast`, sends the tables inline or through `/forecast/prepare_upload`, waits on `/forecast/forecast` and polls `/forecast/get_job_result` with the shared poll loop when the job outlives the request. The server checks the values; its parse and validation errors come back as typed exceptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
Job ids on every job error, USER_ERROR refusals as InvalidSeriesError, the pending retry hint in the poll loop, and quota and rate limits as for predict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
Target and covariate names never become columns of the result, so any name is fine for them. The id and timestamp columns are output columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
The server's forecast limits replace `max_table_bytes` with `max_file_bytes` and `max_decoded_bytes`. The old model fails to parse `get_settings`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
The server refuses a job whose tables, times its targets, have more than `max_target_rows` rows. The client now refuses it first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated by Claude Code
Adds
tabpfn_client.timeseries.forecast(), which forecasts the nexthorizonsteps of every item in a long table, with optional past, known and static covariates. The client checks only the structure of the request (column roles, reserved names, limits fromget_settings().forecast); the server worker checks the values and returns typed parse or validation errors. It calls/forecast/forecastfirst and polls/forecast/get_job_resultthrough the shared poll loop when the job outlives the request.The server side is on tabpfn-server branch
eddie/forecast-gapi(not yet merged), so this PR stays a draft until that lands.Details
ForecastResult(forecast: DataFrame, metadata: ForecastMetadata(n_items, runtime_s)).max_inline_table_bytes, else through/forecast/prepare_upload(a signed URL each for the series and the known-covariates table).InvalidSeriesErrorfor request problems;TimeSeriesInputParseError/TimeSeriesInputValidationError(subclasses ofTimeSeriesJobFailedError) for worker input errors;TimeSeriesJobFailedErrorotherwise.ForecastLimitsmirrors the server with no defaults. Withoutforecastin the settings,forecast()raises._PollResponseTis now bound to a protocol that needs onlyretry_in_secs, so the forecast poll reuses_poll_until_done.🤖 Generated with Claude Code
https://claude.ai/code/session_01FT4GDz1gUFQ8SxzCYfncoz