-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrift.yaml
More file actions
130 lines (114 loc) · 4.95 KB
/
Copy pathdrift.yaml
File metadata and controls
130 lines (114 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# =============================================================================
# Drift detection configuration
# =============================================================================
# Shared by the offline pipeline drift stage and online monitoring.
# All thresholds and severity levels are fully configurable.
drift:
# Master switch — set to false to disable drift analysis entirely
enabled: true
# Which preprocessed split to use as reference baseline
# Currently only "train" is supported
reference_source: "train"
# Statistical tests used by Evidently for drift detection
stattest:
numerical: "ks" # Kolmogorov-Smirnov test for numerical features
categorical: "chisquare" # Chi-square test for categorical features
# P-value thresholds below which drift is flagged per feature
stattest_threshold:
numerical: 0.05
categorical: 0.05
# Fraction of features that must drift for dataset_drift_detected=true
drift_share: 0.5
# Overall severity classification based on drift_share
# drift_share <= low_max → "low"
# low_max < drift_share <= medium_max → "medium"
# drift_share > medium_max → "high"
severity:
low_max: 0.25
medium_max: 0.50
# Per-feature severity classification based on p-value
# p-value < high_below → "high"
# high_below <= p-value < medium_below → "medium"
# p-value >= medium_below (but < stattest_threshold) → "low"
feature_severity:
high_below: 0.001
medium_below: 0.01
# Online monitoring settings
monitoring:
enabled: true
# Minimum rows in a batch to compute drift (below this, skip).
# Matches the small-sample threshold used by the statistical tests —
# below 50 rows KS / chi-square power degrades sharply, so results
# carry a "small_sample" warning on the drift report.
min_batch_size: 10
# Notify user when severity reaches this level or higher
alert_severity: "medium"
# CI gate: in non-interactive (non-TTY) runs, exit non-zero (code 2) when
# observed severity meets or exceeds this level. "never" disables the gate.
# Allowed values: low | medium | high | never
fail_on_severity: "high"
# ==========================================================================
# Image drift — ISP-based scenario simulation (raw DNG datasets only)
# Only used when raw_input: true in the preprocessing config.
# Ignored entirely for tabular and standard JPG/PNG image tasks.
# ==========================================================================
image:
# Severity thresholds for per-channel Wasserstein image drift scores.
# Defaults assume z-scored images (normalize=True in preprocessing).
# score < medium → "low"
# medium <= score < high → "medium"
# score >= high → "high"
# Rule of thumb: medium ≈ 2× noise floor, high ≈ 5× noise floor.
severity:
medium: 0.10
high: 0.25
# Drift scenarios: each defines a name, optional description, and ISP
# parameter overrides relative to the baseline preprocessing config.
# Only explicitly listed parameters are changed; all others keep their
# baseline values. Parameter values are clipped to parameter_bounds before
# use and a warning is logged if clipping occurs.
scenarios:
- name: "wb_shift_warm"
description: "White balance shifted toward warm tones (red gain increased, blue gain reduced)"
isp:
white_balance:
r_gain: 1.8
b_gain: 0.7
- name: "wb_shift_cool"
description: "White balance shifted toward cool tones (red gain reduced, blue gain increased)"
isp:
white_balance:
r_gain: 0.7
b_gain: 1.8
- name: "high_noise"
description: "Denoising disabled — simulates high-ISO sensor noise reaching the model"
isp:
denoising:
strength: 0.0
- name: "dark_gamma"
description: "High gamma — simulates an underexposed or dark pipeline output"
isp:
gamma_correction:
gamma: 2.8
- name: "bright_gamma"
description: "Low gamma — simulates an overexposed or bright pipeline output"
isp:
gamma_correction:
gamma: 1.2
- name: "heavy_sharpening"
description: "Aggressive unsharp mask — simulates over-sharpened pipeline"
isp:
sharpening:
amount: 2.5
radius: 2.0
# Bounds enforced on all scenario ISP overrides. Values outside these
# ranges are clipped to the nearest bound and logged as warnings.
# Keys use the format "isp_section.parameter_name".
parameter_bounds:
white_balance.r_gain: [0.5, 2.5]
white_balance.g_gain: [0.5, 2.0]
white_balance.b_gain: [0.5, 2.0]
denoising.strength: [0.0, 1.0]
sharpening.radius: [0.1, 5.0]
sharpening.amount: [0.0, 3.0]
gamma_correction.gamma: [1.0, 2.8]