CLI Reference

compileml export

Export the artifact to native code.

compileml export decision.json --target sql   --dialect ansi --out scorer.sql
compileml export decision.json --target cobol --program-id CMLSCORE --out scorer.cob

# with reason codes and integer impacts (depth <= 2 artifacts)
compileml export decision.json --target sql   --explain --top-k 4 --out scorer.sql
compileml export decision.json --target cobol --explain --top-k 4 --out scorer.cob

Both targets emit score, band and calibrated PD. --explain adds the reason codes and display-scale integer impacts decide(..., explain=True) returns, in order; --top-k sets how many per direction and defaults to the artifact's own. With --explain, the SQL query needs SQLite 3.35+, PostgreSQL 12+ or DuckDB. See deploying for the output fields.

Exit status is 0 on success. When the exporter refuses an artifact it prints the error code and exits 2:

CodeTargetCause
EXPLAIN_NOT_EXACTboth--explain on an artifact whose attribution is not exact (whitebox depth > 2)
REASON_CODE_NOT_ASCIICOBOLa reason code that is not printable ASCII

Arguments

FlagDescription
artifactPath to the artifact JSON.
--target {cobol,sql}Output language. Required.
--out OUTOutput file (default: stdout).
--table TABLESQL source table name. Default features.
--dialect {ansi,sqlite}SQL dialect. Default ansi.
--program-id PROGRAM_IDCOBOL PROGRAM-ID. Default CMLSCORE.
--explainAlso emit reason codes and impacts (depth <= 2 artifacts).
--top-k TOP_KReasons per direction.