feat: add TaskResultStore for caching and replaying task execution results#176
Merged
afarntrog merged 4 commits intostrands-agents:mainfrom Mar 24, 2026
Merged
Conversation
Introduce TaskResultStore abstraction to enable caching and reuse of task results across experiment runs. Refactor Experiment class to extract task execution logic into a dedicated method with retry, tracing, and optional result store integration. Add case name validation to ensure uniqueness when using a result store.
Introduce TaskResultStore abstraction to enable caching and reuse of task results across experiment runs. Refactor Experiment class to extract task execution logic into a dedicated method with retry, tracing, and optional result store integration. Add case name validation to ensure uniqueness when using a result store.
poshinchen
reviewed
Mar 24, 2026
poshinchen
reviewed
Mar 24, 2026
poshinchen
reviewed
Mar 24, 2026
poshinchen
reviewed
Mar 24, 2026
Contributor
poshinchen
left a comment
There was a problem hiding this comment.
Is the next step implementing the local store (save and load json)?
Contributor
Author
Yes |
Rename the TaskResultStore class and module to EvaluationDataStore to better reflect its purpose of storing evaluation data rather than just task results. Updates all references including module file, class name, parameter names, docstrings, error messages, and tests.
poshinchen
previously approved these changes
Mar 24, 2026
Rename the TaskResultStore class and module to EvaluationDataStore to better reflect its purpose of storing evaluation data rather than just task results. Updates all references including module file, class name, parameter names, docstrings, error messages, and tests.
poshinchen
approved these changes
Mar 24, 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.
Description
Add
TaskResultStoreprotocol for caching task execution results across experiment runs. This enables skipping expensive task re-execution (e.g., LLM calls) when iterating on evaluators, by loading cachedEvaluationDatafrom a pluggable storage backend. In addition, refactor the multi hundred line_workermethod.TaskResultStoreprotocol withload/savemethods that implementations can back with any storage (files, S3, databases, etc.)task_result_storeparameter inrun_evaluationsandrun_evaluations_async_workerby extracting_execute_taskand_run_evaluatorinto standalone methods for readabilityTaskResultStorefrom the top-levelstrands_evalspackageRelated Issues
#94
Documentation PR
Type of Change
New feature
Testing
Added 5 unit tests in
tests/strands_evals/test_experiment.pyunder a newTestTaskResultStoreclass covering:Uses a
DictTaskResultStorein-memory implementation for test isolation.hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.