-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support candidate and accepted drift stores #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3fa6471
93d0516
ccb0c43
47f7fa9
2d3c3cc
a32919c
b54d4f0
4db0efd
68473c9
6269a8f
cb3ce59
a8a8897
6064d70
360f9e8
b854781
1bcf86b
cd3bf62
6a1e27f
215308f
c5556bf
a306ab9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -403,7 +403,7 @@ def _run_drift_phase(domain: str, store: PerformanceStore) -> tuple[list, list]: | |
| """Phase 2: run drift detection, return (all_drifts, alerting_drifts).""" | ||
| from quant_platform_kit.strategy_lifecycle.drift_detector import run_drift_detection | ||
| drifts = run_drift_detection(domain, store=store) | ||
| alerts = [d for d in drifts if d.status != DriftStatus.HEALTHY] | ||
| alerts = [d for d in drifts if d.status != DriftStatus.HEALTHY and not d.alert_suppressed] | ||
|
Comment on lines
405
to
+406
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When operators run Useful? React with 👍 / 👎. |
||
| return drifts, alerts | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -535,6 +535,19 @@ def _drift_from_dict(data: Mapping[str, Any]) -> DriftResult | None: | |
| drift_score=float(data.get("drift_score", 0)), | ||
| status=DriftStatus(str(data.get("status", "healthy"))), | ||
| dimensions=dimensions, | ||
| previous_status=DriftStatus(str(data["previous_status"])) if data.get("previous_status") else None, | ||
| baseline_param_set_id=str(data["baseline_param_set_id"]) if data.get("baseline_param_set_id") else None, | ||
| baseline_available=bool(data.get("baseline_available", True)), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the new missing-baseline paths persist a placeholder result, Useful? React with 👍 / 👎. |
||
| baseline_param_version=( | ||
| int(data["baseline_param_version"]) | ||
| if data.get("baseline_param_version") is not None | ||
| else None | ||
| ), | ||
| baseline_artifact_id=( | ||
| str(data["baseline_artifact_id"]) | ||
| if data.get("baseline_artifact_id") | ||
| else None | ||
| ), | ||
| ) | ||
| except Exception: | ||
| return None | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
--baseline-bucketis used without--baseline-local-root, this passeslocal_root=None, butPerformanceStoreinterpretsNoneasDEFAULT_LOCAL_ROOTandload_latest_backtest()merges cloud keys with local keys. In cloud candidate runs the active store also writes candidate backtests to that default local root, so the accepted-baseline store can select a local candidate backtest instead of the accepted bucket baseline, defeating the candidate-vs-accepted comparison. Use an isolated or disabled local root for bucket-only baselines.Useful? React with 👍 / 👎.