Add same_family_bias model argument for Cassandra#207
Draft
homatthew wants to merge 2 commits intoNetflix-Skunkworks:mainfrom
Draft
Add same_family_bias model argument for Cassandra#207homatthew wants to merge 2 commits intoNetflix-Skunkworks:mainfrom
homatthew wants to merge 2 commits intoNetflix-Skunkworks:mainfrom
Conversation
These tests define the interface for a new `family_bias` argument that will allow tuning the least-regret selection to prefer certain instance families. Tests cover: - Argument acceptance in NflxCassandraArguments - Default value behavior - Selection bias toward preferred families - Penalty behavior to avoid certain families - Regret calculation mechanics The tests currently fail with: AttributeError: 'NflxCassandraArguments' object has no attribute 'family_bias' Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new `same_family_bias` parameter to `NflxCassandraArguments` that
penalizes switching to a different instance family during capacity planning.
When `same_family_bias` is set and `desires.current_clusters` is provided:
- Plans that keep the same instance family as the current cluster
are sorted by their actual cost
- Plans that switch to a different family have their effective cost
multiplied by `same_family_bias` for sorting purposes
This helps maintain operational stability by preferring to stay on
familiar instance families when the cost difference is small.
Example usage:
extra_model_arguments={"same_family_bias": 2.0}
# Plans switching families appear as 2x more expensive during sorting
Co-Authored-By: Claude Opus 4.5 <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
Adds a new
same_family_biasparameter toNflxCassandraArgumentsthat penalizes switching to a different instance family during capacity planning.Key changes:
same_family_bias: Optional[float]field toNflxCassandraArguments_plan_certain()in capacity_planner.py to apply bias during sortingBehavior
When
same_family_biasis set anddesires.current_clustersis provided:same_family_biasfor sorting purposesThis helps maintain operational stability by preferring to stay on familiar instance families when the cost difference is small.
Example Usage
Test plan
🤖 Generated with Claude Code