Repository navigation
fix: honor zero values in Dataset.reset_seeds - #9906
Merged
isaacbmiller merged 2 commits intoAug 15, 2026
Merged
Conversation
reset_seeds used `x or self.x` to decide whether to apply each argument, so passing 0 (a valid seed or size) was treated as falsy and silently dropped, keeping the previous value instead. Use an explicit None check so 0 is honored.
Contributor
Greptile SummaryThis update correctly accepts explicit zero values for dataset seeds and split sizes, while preserving existing settings when arguments are omitted. Runtime checks confirmed that both evaluation-derived split seeds remain unchanged when Confidence Score: 5/5No blocking failure remains. Focused runtime checks verified zero-value overrides, cached split invalidation, and preservation of both development and test seeds when evaluation settings are omitted.
What T-Rex did
Reviews (2): Last reviewed commit: "Apply suggestion from @greptile-apps[bot..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Isaac Miller <17116851+isaacbmiller@users.noreply.github.com>
Collaborator
|
lgtm |
marcodelpin
pushed a commit
to marcodelpin/dspy
that referenced
this pull request
Aug 15, 2026
… PythonInterpreter request-handling hardening stanfordnlp#10208, Dataset.reset_seeds zero-values stanfordnlp#9906)
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.
Dataset.reset_seedsupdates each seed/size withvalue or self.value. Since0is falsy, passing a valid0is silently dropped and the previous value is kept.Repro:
This affects anyone resetting to seed 0 (a common default) or requesting an empty split with size 0.
Fix: replace the
orfallbacks with explicitis not Nonechecks so0is applied while omitted (None) arguments still leave the existing value untouched. Added tests covering both the zero case and the omitted-argument behavior.