feat: expose server-reported fit and predict timings - #392
Merged
Merged
Conversation
Users could only measure the total wall time of fit() and predict(), which does not tell waiting for capacity apart from time spent on the work. The API now reports that split, so the estimators keep it and return it from get_timings(). ServiceClient.fit() keeps returning the fitted id; fit_with_result() adds the timings. Against a server that does not report timings every value is None. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A99qZsvdCamLPCMD77vkDw
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A99qZsvdCamLPCMD77vkDw
simo-prior
approved these changes
Sep 15, 2026
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.
Adds server-reported timings to
TabPFNClassifierandTabPFNRegressor, so users can tell time spent waiting for the server to start the work apart from time spent doing it.fit_timings_(set byfit()) andlast_predict_timings.get_timings()returns both.PredictionResultgainstimings.ServiceClient.fit_with_result()returns aFitResultwith the fitted id and the timings;ServiceClient.fit()still returns only the id./fittakes its timings from the final status poll.output_type="full"above the row limit) reports the per-stage sum.api_models.pygainsFitTimings,PredictTimingsand the optionaltimingsfields, copied from the API schema.Compatibility
None; nothing else changes.check_estimatorrequirespredict()to leave the estimator's__dict__unchanged.InferenceClient.fitnow patchInferenceClient.fit_with_result, which the estimators call.🤖 Generated with Claude Code
https://claude.ai/code/session_01A99qZsvdCamLPCMD77vkDw