OCDocker.OCScore.Utils.LeakageAudit module¶
Leakage audit helpers for staged OCScore production-grade protocols.
- class OCDocker.OCScore.Utils.LeakageAudit.LeakageAuditResult(passed, findings=<factory>)[source]¶
Bases:
objectAggregated leakage audit output.
- Parameters:
passed (bool)
findings (list[LeakageFinding])
- passed: bool¶
- findings: list[LeakageFinding]¶
- class OCDocker.OCScore.Utils.LeakageAudit.LeakageFinding(severity, code, message, details=<factory>)[source]¶
Bases:
objectSingle leakage audit finding.
- Parameters:
severity (str)
code (str)
message (str)
details (dict[str, Any])
- severity: str¶
- code: str¶
- message: str¶
- details: dict[str, Any]¶
- OCDocker.OCScore.Utils.LeakageAudit.run_leakage_audit(*, feature_selection=None, pdbbind_split_diagnostics=None, dudez_split_diagnostics=None, scaling_metadata=None, strict=False)[source]¶
Run production-grade leakage checks on staged protocol metadata.
- Parameters:
feature_selection (dict | None) – Feature-selection scope metadata.
pdbbind_split_diagnostics (dict | None) – PDBbind split diagnostics from the regression stage.
dudez_split_diagnostics (dict | None) – DUDEz split diagnostics from the screening stage.
scaling_metadata (dict | None) – DUDEz scaling metadata.
strict (bool) – When True, critical findings fail the audit.
- Returns:
Audit outcome and findings list.
- Return type:
- OCDocker.OCScore.Utils.LeakageAudit.write_leakage_audit_report(output_dir, result)[source]¶
Write
leakage_audit.jsontooutput_dir.- Parameters:
output_dir (str | Path)
result (LeakageAuditResult)
- Return type:
Path