Skip to content

Fix/issue 213 dataset to experiment#243

Open
madhununna wants to merge 10 commits intostrands-agents:mainfrom
madhununna:fix/issue-213-dataset-to-experiment
Open

Fix/issue 213 dataset to experiment#243
madhununna wants to merge 10 commits intostrands-agents:mainfrom
madhununna:fix/issue-213-dataset-to-experiment

Conversation

@madhununna
Copy link
Copy Markdown

Issue #, if available:

*Description of changes:## Summary

Fixes #213

The strands_evals library replaced the Dataset class with Experiment and DatasetGenerator with ExperimentGenerator. This updates 3 evaluation notebooks to use the current API.

Changes

  • from strands_evals import DatasetExperiment
  • from strands_evals.generators import DatasetGeneratorExperimentGenerator
  • Dataset(cases=..., evaluator=x)Experiment(cases=..., evaluators=[x])
  • Dataset.from_file()Experiment.from_file()
  • .evaluator property → .evaluators[0]
  • update_current_dataset_async()update_current_experiment_async()

Files Changed

  • python/06-evaluate/dataset-generation/03-dataset-generation.ipynb
  • python/06-evaluate/multi-agent-evaluation/06-multi-agent-evaluation.ipynb
  • python/06-evaluate/multi-turn-actor-simulator/05-multi-turn-actor-simulator.ipynb

Testing

Validated API changes with a live Bedrock call confirming Experiment, ExperimentGenerator, from_file(), evaluators[0], and run_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.

…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
@github-actions
Copy link
Copy Markdown

Latest scan for commit: 0c5753b | Updated: 2026-04-15 06:54:24 UTC

✅ Security Scan Report (PR Files Only)

Scanned Files

  • CONTRIBUTORS.md
  • python/06-evaluate/dataset-generation/03-dataset-generation.ipynb
  • python/06-evaluate/multi-agent-evaluation/06-multi-agent-evaluation.ipynb
  • python/06-evaluate/multi-turn-actor-simulator/05-multi-turn-actor-simulator.ipynb
  • python/07-ux-demos/streamlit-template/docker_app/app_streaming.py

Security Scan Results

Critical High Medium Low Info
0 0 0 0 0

Threshold: High

No security issues detected in your changes. Great job!

This scan only covers files changed in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue importing Dataset class when using strands_evals package in evaluations samples.

1 participant