fix(cleanup): preserve baseline seed experiments on standard cleanup#12
Merged
Robert Xu (xuro-langchain) merged 1 commit intoJun 11, 2026
Conversation
delete_ci_experiments() deleted every experiment linked to the dataset, including the baseline-haiku / baseline-sonnet seeds that setup.py creates as the demo's Haiku-vs-Sonnet "before" reference. So a standard cleanup emptied the experiment list even though the README says setup does not need to be re-run afterward. Skip experiments whose name starts with "baseline-" so the seeds survive; CI/Engine experiments are still swept. Updates the docstring, step message, and README Cleanup section to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bf14f0b
into
langchain-samples:main
1 check passed
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.
Problem
scripts/cleanup.py→delete_ci_experiments()deletes every experiment linked to the dataset:That includes the
baseline-haiku-…/baseline-sonnet-…experimentssetup.pyseeds as the demo's Haiku-vs-Sonnet "before" reference. So a standardcleanupempties the dataset's experiment list — even though the README promises "After cleanup, the demo is ready to run again — no need to re-runsetup.py." The presenter has to reseed baselines manually after every cleanup.Fix
Skip experiments whose name starts with
baseline-(the prefixsetup.pyuses). CI/Engine experiments (engine-…) are still swept as before. Docstring, the[2/3]step message, and the README Cleanup section updated to say baselines are preserved.Testing
Verified against a live dataset with two baseline seeds present:
Both
baseline-haiku-…andbaseline-sonnet-…survived; a non-baseline-experiment would still be deleted (logic unchanged for those).Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com