Skip to content

feat(ml): incident4 pipeline - #11

Merged
UsatovPavel merged 1 commit into
mainfrom
feat/incident4-pipeline
Sep 28, 2026
Merged

UsatovPavel merged 1 commit into
mainfrom
feat/incident4-pipeline

Conversation

@UsatovPavel

Copy link
Copy Markdown
Contributor

Jira: https://goal-jira.atlassian.net/browse/HACK-145

Adds the 4-class incident pipeline (run v4) in retraining/notebooks/incident4/. Existing notebooks, app.py, inference/, data/ and CI are not touched.

What's inside

  • Notebooks 1–3 from the v4 run, with outputs and execution counts stripped:
    • target by справочник_состояний («вариант 1») and the «Не замкнут» fix;
    • intra-second look-ahead fix and dedup of journal rows;
    • 80/10/10 split by channel within each class, plus a June 2026 blind set;
    • June censoring, and GAS 0.15 / INTRUSION 0.5 thinning in train only;
    • feature selection by val macro PR-AUC.
  • train_v4.py trains in segments of 100 trees and stops early on val macro PR-AUC.
  • eval_v4.py runs the one-shot blind evaluation against v3, prod and the baseline rules.
  • check_lookahead.py brute-force checks the look-ahead fix.
  • pipeline_v4.sh runs everything in order and best_params.json holds the v1 params.
  • README.md (Russian) covers the differences from the original notebooks, how to run, resources and the blind-test results with caveats.

VM-specific paths are now parameters:

  • the run dir is RUN_DIR (argument or env), defaulting to the git-ignored retraining/artifacts/runs/incident4_v4;
  • comparison models and chunk maps come from COMPARE_DIR / V3_MODEL / PROD_MODEL / V3_CHUNK_MAP / V2_CHUNK_MAP;
  • the private notebook runner is replaced by jupyter nbconvert --execute.

Model logic is unchanged. Model binaries are not committed.

Size

About 1880 added lines, mostly notebook JSON. This is above the usual 1000/1500 limit, which was agreed with the owner for this single PR.

Checks

  • Notebooks validated with nbformat and have no outputs.
  • py_compile passes on the scripts and bash -n passes on the shell script.
  • Grep finds no user paths, hosts or secrets.
  • The repo tests were not run locally (pytest is not in the venv). The PR only adds files that nothing imports, and CI runs the suite.

🤖 Generated with Claude Code

4-class target (FIRE/FLOOD/GAS/INTRUSION) notebooks 1-3 with outputs
stripped, segmented training, one-shot blind evaluation and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@UsatovPavel
UsatovPavel merged commit 6daf4de into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant