feat(llmobs): add SyncExperiment.rerun_evaluators() and make task/dataset optional#17292
Open
mehulsonowal wants to merge 3 commits intomehul.sonowal/experiment-to-dataframefrom
Open
feat(llmobs): add SyncExperiment.rerun_evaluators() and make task/dataset optional#17292mehulsonowal wants to merge 3 commits intomehul.sonowal/experiment-to-dataframefrom
mehulsonowal wants to merge 3 commits intomehul.sonowal/experiment-to-dataframefrom
Conversation
…n experiments
- Add `SyncExperiment.rerun_evaluators()` to re-score stored task outputs
without re-executing the task function; reads from `self.result` and
replaces it with a new `ExperimentResult` containing fresh evaluations
- Add `missing_task_strategy` parameter ('raise'/'skip'/'retry') to control
behavior when prior rows have errors
- Make `task` and `dataset` optional in `LLMObs.experiment()`,
`Experiment.__init__`, and `SyncExperiment.__init__` to support the
pull() + rerun_evaluators() workflow where no task or dataset is needed
- Guard `Experiment.run()` to raise ValueError when called without task/dataset
- Add tests covering: rerun skips task, error strategies, result preservation,
init without task/dataset, run() guard, and rerun without task/dataset
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…k/dataset Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Codeowners resolved as |
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.
Summary
SyncExperiment.rerun_evaluators()to re-score stored task outputs with updated evaluators without re-running the task functiontaskanddatasetoptional inLLMObs.experiment()/Experiment.__init__/SyncExperiment.__init__to support thepull()+rerun_evaluators()workflowExperiment.run()to raiseValueErrorwhen called withouttaskanddatasetmissing_task_strategyparameter ("raise"/"skip"/"retry") to control error-row handling during re-runsBehavior
Test plan
test_experiment_rerun_evaluators_skips_task— verifies_process_recordis not called againtest_experiment_rerun_raises_on_task_errors— default"raise"strategytest_experiment_rerun_skip_strategy—"skip"skips error rowstest_experiment_rerun_invalid_strategy— invalid strategy raisesValueErrortest_experiment_rerun_no_prior_result— guards against calling beforerun()test_experiment_rerun_preserves_experiment_id— no new experiment createdtest_experiment_init_without_task_and_dataset— no error at init (passes locally)test_experiment_run_without_task_raises—run()guard (passes locally)test_experiment_rerun_without_task_succeeds— rerun works with pre-loaded result🤖 Generated with Claude Code