Merged
Conversation
- Add forecast() and forecast_async() to everyrow.ops - Add everyrow_forecast MCP tool with ForecastInput model - Regenerate API client from latest engine OpenAPI spec (adds forecast endpoint, list sessions, cancel task) - Add integration test for forecast operation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rgambee
reviewed
Feb 23, 2026
src/everyrow/ops.py
Outdated
| async def forecast( | ||
| task: str, | ||
| session: Session | None = None, | ||
| input: DataFrame | UUID | TableResult | None = None, |
Contributor
There was a problem hiding this comment.
Not something to fix in this PR, but why do our blocking operations accept and default to input = None, only to raise an exception if it is in fact None? I'll look into changing that in another PR.
| Then two forecasting models (Gemini + Opus Thinking) synthesize all research into | ||
| a probability (0-100%, median of both) and rationale for each row. | ||
|
|
||
| Output columns added: `rationale` (str) and `probability` (int, 0-100). |
Contributor
There was a problem hiding this comment.
If the field is called probability, I would expect it to be in the range 0 to 1. If we really do want to return a percentage, I'd name it probability_pct. I leave it to others with more forecasting background to choose whether 0 to 1 or 0 to 100 is the more standard range.
Contributor
Author
There was a problem hiding this comment.
Interesting point. I'm not sure.
- Replace implementation-detail docstring with user-facing description matching SDK style (rgambee review) - Improve input_csv field description for ForecastInput (rgambee review) - Update manifest description to match new docstring - Run ruff format on generated API client files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert unrelated formatting changes from openapi-python-client regeneration. Keep only the genuinely new files (forecast, cancel_task, list_sessions) and minimal __init__.py additions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These endpoints were picked up by the OpenAPI client regeneration but are not part of the forecast feature. cancel_task will be added by #186. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents test from going stale when the resolution date passes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The forecast operation doesn't need a task instruction the way other ops do — a well-formed question with resolution criteria is self-contained. Rename to `context` to communicate that it provides optional batch-level framing, and make it default to None. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Uh oh!
There was an error while loading. Please reload this page.