Fix/issue 213 dataset to experiment#243
Open
madhununna wants to merge 10 commits intostrands-agents:mainfrom
Open
Fix/issue 213 dataset to experiment#243madhununna wants to merge 10 commits intostrands-agents:mainfrom
madhununna wants to merge 10 commits intostrands-agents:mainfrom
Conversation
…ing.py In app_streaming.py, details_placeholder was checked in session state but never initialized, causing AttributeError on newer Streamlit versions. Unlike app.py which properly initializes it, app_streaming.py has no use for it. Removed the dead code block. Fixes strands-agents#140
Initialize details_placeholder in session state at app startup to prevent uninitialized reference errors while preserving the cleanup behavior that prevents stale tool details from persisting across prompts. This addresses feedback on PR-232 by using the safer approach of initializing the placeholder rather than removing the cleanup call.
Initialize details_placeholder in session state at app startup to prevent uninitialized reference errors while preserving the cleanup behavior that prevents stale tool details from persisting across prompts. This addresses feedback on PR-232 by using the safer approach of initializing the placeholder rather than removing the cleanup call.
Add back the cleanup call that clears details_placeholder between prompts. The previous commit only added initialization but missed restoring the cleanup behavior that prevents stale tool details from persisting. Now the fix properly: - Initializes details_placeholder at startup (prevents crash) - Clears it before each new prompt (prevents stale content)
strands_evals removed Dataset in favor of Experiment. Update 3 evaluation notebooks to use the new API: - Replace 'from strands_evals import Dataset' with Experiment - Replace Dataset() constructor with Experiment() - Update evaluator= (singular) to evaluators=[] (plural list) - Replace Dataset.from_file() with Experiment.from_file() Fixes strands-agents#213
Also fix .evaluator property access to .evaluators[0] and update_current_dataset_async to update_current_experiment_async
…13-dataset-to-experiment
|
Latest scan for commit: ✅ Security Scan Report (PR Files Only)Scanned Files
Security Scan Results
Threshold: High No security issues detected in your changes. Great job! This scan only covers files changed in this PR. |
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.
Issue #, if available:
*Description of changes:## Summary
Fixes #213
The
strands_evalslibrary replaced theDatasetclass withExperimentandDatasetGeneratorwithExperimentGenerator. This updates 3 evaluation notebooks to use the current API.Changes
from strands_evals import Dataset→Experimentfrom strands_evals.generators import DatasetGenerator→ExperimentGeneratorDataset(cases=..., evaluator=x)→Experiment(cases=..., evaluators=[x])Dataset.from_file()→Experiment.from_file().evaluatorproperty →.evaluators[0]update_current_dataset_async()→update_current_experiment_async()Files Changed
python/06-evaluate/dataset-generation/03-dataset-generation.ipynbpython/06-evaluate/multi-agent-evaluation/06-multi-agent-evaluation.ipynbpython/06-evaluate/multi-turn-actor-simulator/05-multi-turn-actor-simulator.ipynbTesting
Validated API changes with a live Bedrock call confirming
Experiment,ExperimentGenerator,from_file(),evaluators[0], andrun_evaluations()all work correctly.*By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.