File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/sentry/seer/similarity Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1616# - Rolled-out projects: Use this for ALL requests (both grouping and embeddings)
1717# - Non-rolled-out projects: Never use this (use stable version for everything)
1818# Set to None to disable rollout entirely
19- SEER_GROUPING_NEW_VERSION = GroupingVersion .V2
19+ SEER_GROUPING_NEW_VERSION : GroupingVersion | None = GroupingVersion .V2
2020
2121# Feature flag name (version-agnostic)
2222SEER_GROUPING_NEW_MODEL_ROLLOUT_FEATURE = "projects:similarity-grouping-model-upgrade"
@@ -30,7 +30,12 @@ def get_grouping_model_version(project: Project) -> GroupingVersion:
3030 - New version if rollout is enabled for this project
3131 - Stable version otherwise
3232 """
33- if is_new_model_rolled_out (project ):
33+ # Early return if no new version configured
34+ if SEER_GROUPING_NEW_VERSION is None :
35+ return SEER_GROUPING_STABLE_VERSION
36+
37+ # Type is narrowed to GroupingVersion here
38+ if features .has (SEER_GROUPING_NEW_MODEL_ROLLOUT_FEATURE , project ):
3439 return SEER_GROUPING_NEW_VERSION
3540 return SEER_GROUPING_STABLE_VERSION
3641
You can’t perform that action at this time.
0 commit comments