2.27.2.16. pycsamt.pipeline.ai_steps#

Opt-in AI-backed pipeline step: the domain-gap survey audit.

Registering this step is deliberately not automatic. Resolving it forces a real torch import (pycsamt.ai’s package __init__ eagerly pulls in pycsamt.ai.nets.drcnn, which imports torch at module level so its classes are picklable — see that module’s own comment), so it must not be a cost every pipeline user pays just for import pycsamt.pipeline. Call register_ai_steps() explicitly, or pass pycsamt pipe --with-ai-steps on the CLI, exactly the same opt-in shape as discover_plugins().

Functions

qc_audit_survey(sites, **kw)

Run pycsamt.ai.domain_gap.audit.audit_survey() as a QC step.

register_ai_steps(*[, replace_existing])

Register the opt-in AI step(s) into the pipeline step registry.

pycsamt.pipeline.ai_steps.qc_audit_survey(sites, **kw)[source]

Run pycsamt.ai.domain_gap.audit.audit_survey() as a QC step.

Diagnostic only: prints the report summary and, when report_path is supplied, writes the full report as JSON. sites is never modified.

Parameters:
  • sites (Any) – Anything accepted by ensure_sites (path, EDI collection, Sites).

  • report_path – Optional destination for SurveyAuditReport.write_json().

  • **kw (Any) – Forwarded to audit_survey (recursive, on_dup, verbose, freq_rtol, band, skew_th, ellipt_th, station_spacing_fallback, metadata).

Return type:

None

pycsamt.pipeline.ai_steps.register_ai_steps(*, replace_existing=False)[source]

Register the opt-in AI step(s) into the pipeline step registry.

Currently just AI001 / audit_survey. Never called automatically — see the module docstring for why.

Parameters:

replace_existing (bool) – Forwarded to register_step().

Returns:

The registered spec(s), each stamped origin="plugin" by register_step.

Return type:

list[StepSpec]