fix(fzd): deduplicate batch inputs before calling fzr#61
Open
yannrichet-tmp wants to merge 1 commit intoFunz:mainfrom
Open
fix(fzd): deduplicate batch inputs before calling fzr#61yannrichet-tmp wants to merge 1 commit intoFunz:mainfrom
yannrichet-tmp wants to merge 1 commit intoFunz:mainfrom
Conversation
Algorithms like brent submit batches containing duplicate parameter values (e.g. the initial [min, max, max] design). fzr would fail because two entries map to the same temp-directory name. Before calling fzr, build a unique_design list and an index_map that records which slot in unique_design each original entry corresponds to. After fzr returns, reconstruct result_df to the full original length by re-indexing with iloc[index_map], so the algorithm sees the expected number of results including the duplicated ones. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
fzdbatches before passing them tofzr: when a design-of-experiments algorithm proposes duplicate points in a single batch, each unique point is now evaluated only once and results are reused for duplicates. This avoids redundant computations and prevents silent result overwrites (since duplicate rows would map to the same temp directory).fzrinput:fzrnow raises a clearValueErrorif itsinput_variablesDataFrame contains duplicate rows, catching the issue early with an informative message.Test plan
fzrraisesValueErrorwhen given a DataFrame with duplicate rowsfzdcorrectly deduplicates batch points and re-maps results back to the full design🤖 Generated with Claude Code