fix: ruff lint — sort imports, remove unused GateThresholdResult import
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-1 Pipeline was successful
ci/woodpecker/push/build-2 Pipeline was successful
ci/woodpecker/push/build-3 Pipeline was successful
ci/woodpecker/push/finalize Pipeline was successful
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-1 Pipeline was successful
ci/woodpecker/push/build-2 Pipeline was successful
ci/woodpecker/push/build-3 Pipeline was successful
ci/woodpecker/push/finalize Pipeline was successful
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled
This commit is contained in:
@@ -12,18 +12,16 @@ import hashlib
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
# -- Prediction Snapshot Writer --
|
# -- Quality Gate --
|
||||||
from services.validation.prediction_snapshot import (
|
from services.trading.model_quality_gate import (
|
||||||
MAX_SINGLE_DOCUMENT_WEIGHT,
|
QualityGateConfig,
|
||||||
compute_canonical_evidence_key,
|
_evaluate_thresholds,
|
||||||
compute_contribution_scores,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# -- Outcome Evaluator --
|
# -- Calibration Engine --
|
||||||
from services.validation.outcome_evaluator import (
|
from services.validation.calibration import (
|
||||||
_compute_return,
|
compute_adjusted_evidence_weight,
|
||||||
_is_direction_correct,
|
compute_source_reliability,
|
||||||
_is_profitable,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# -- Metrics Engine --
|
# -- Metrics Engine --
|
||||||
@@ -34,19 +32,20 @@ from services.validation.metrics import (
|
|||||||
compute_rank_information_coefficient,
|
compute_rank_information_coefficient,
|
||||||
)
|
)
|
||||||
|
|
||||||
# -- Calibration Engine --
|
# -- Outcome Evaluator --
|
||||||
from services.validation.calibration import (
|
from services.validation.outcome_evaluator import (
|
||||||
compute_adjusted_evidence_weight,
|
_compute_return,
|
||||||
compute_source_reliability,
|
_is_direction_correct,
|
||||||
|
_is_profitable,
|
||||||
)
|
)
|
||||||
|
|
||||||
# -- Quality Gate --
|
# -- Prediction Snapshot Writer --
|
||||||
from services.trading.model_quality_gate import (
|
from services.validation.prediction_snapshot import (
|
||||||
QualityGateConfig,
|
MAX_SINGLE_DOCUMENT_WEIGHT,
|
||||||
_evaluate_thresholds,
|
compute_canonical_evidence_key,
|
||||||
|
compute_contribution_scores,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# 8.2 — Prediction Snapshot Writer unit tests
|
# 8.2 — Prediction Snapshot Writer unit tests
|
||||||
# Requirements: 1.1, 2.3, 2.4, 2.5, 3.3
|
# Requirements: 1.1, 2.3, 2.4, 2.5, 3.3
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ from services.validation.metrics import (
|
|||||||
compute_information_coefficient,
|
compute_information_coefficient,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Property 1: Calibration Error Range and Round-Trip
|
# Property 1: Calibration Error Range and Round-Trip
|
||||||
# Validates: Requirements 5.1, 5.3, 17.1
|
# Validates: Requirements 5.1, 5.3, 17.1
|
||||||
@@ -492,7 +491,6 @@ def test_source_reliability_convergence(observed_win_rate: float) -> None:
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
from services.trading.model_quality_gate import (
|
from services.trading.model_quality_gate import (
|
||||||
GateThresholdResult,
|
|
||||||
QualityGateConfig,
|
QualityGateConfig,
|
||||||
_evaluate_thresholds,
|
_evaluate_thresholds,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user