recall_guard.harness.intervention_config
recall_guard.harness.intervention_config
Offline validation and call planning for the versioned experiment command.
Items files are objects {schema_version: 1, items: [...]}. The protocol's
data_hashes.evaluation hashes their exact UTF-8 file bytes. Other dataset
keys need explicit file bindings; original/rewritten_calibration instead bind
semantic fitted-scorer fingerprints and are never interpreted as file hashes.
Optional per-cohort historical metadata has period (pre/post), matching_group,
matching (source/task/format/selection strings), cutoff (model/date/source_url/
retrieved_at/alias_uncertainty), and outcome_dates keyed by that cohort's item
IDs. Outcome dates are never inferred from as_of. A separate source-bearing
registry {schema_version: 1, models: {exact_model: {date, source_url,
retrieved_at, alias_uncertainty}}} must agree before historical availability
is reported. Unknown/ambiguous or absent bases permit general comparisons.
These declarations are provenance, not independent evidence of good matching.
InterventionConfig
dataclass
Validated offline inputs; no client or resolved credential is retained.
Source code in recall_guard/harness/intervention_config.py
173 174 175 176 177 178 179 | |
read_experiment_json
read_experiment_json(path)
Read strict UTF-8 JSON once, retaining the exact bytes for hash checks.
Source code in recall_guard/harness/intervention_config.py
51 52 53 54 | |
load_experiment_config
load_experiment_config(
protocol_path,
items_path,
*,
data_files=None,
cutoff_registry=None,
)
Validate bytes, schemas, local provider policies and declared comparisons.
Source code in recall_guard/harness/intervention_config.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
experiment_plan
experiment_plan(config, *, prior_run=None)
Return a credential-free offline plan of physical request attempts.
Nominal counts assume accepted rewrites and first-attempt successes. Retry upper bounds are subordinate to the shared remaining cap. A safe resume probes all roles again and schedules only pending whole arms.
Source code in recall_guard/harness/intervention_config.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |