Skip to content

[Wave 4] Low/info — Module sweep: Training orchestration, multi-stage pipelines, resume & no-train modes (part 3/3) #714

Open

Description

@cemililik

Wave 4 · 9 finding(s) in 9 fix package(s). Fix these whenever a pull request touches this module ("clean the module you touch").

Findings

  • CR-A04-083 (code, Low) — User manual's event table states pipeline.started/completed fire unconditionally; the code and webhook_schema.md skip them on --resume-from and on an approval gate
    severity Low · reachability default · intent contract-violation · confidence confirmed · independently confirmed · reproduced end to end
    Failure scenario. Resume: after stage 2 failed, --resume-from stage2 sent training.start, training.success, then pipeline.completed(completed) for the same pl_, with no pipeline.started (POST lines 17-19). Gated: stage 2 with require_human_approval exits 4, and the last event is approval.required, with no pipeline.completed (lines 34-38). A receiver built from the user manual treats both as faults or open runs.
    Where. docs/usermanuals/en/operations/webhooks.md:47-48, docs/usermanuals/tr/operations/webhooks.md:47-48, docs/reference/webhook_schema.md:52-57, forgelm/cli/_pipeline.py:1131-1139
    Recommended fix. Copy the 'fresh runs only' and 'not on gated_pending_approval' qualifiers into the user manual table (EN+TR); drop 'single-stage' from webhook_schema.md:35.

  • CR-A04-084 (code, Low) — A checkpoint whose trainer_state.json is present but optimizer.pt (or scheduler.pt) is missing resumes at exit 0 with a fresh optimizer and LR schedule, and nothing logs it
    severity Low · reachability documented-opt-in · intent intended-but-harmful · confidence likely · single reviewer · reproduced end to end
    Failure scenario. An operator restores checkpoint-N from a bucket where optimizer.pt failed to upload. --resume continues silently with a reset optimizer and a warm-restarted LR (a 1e-4 spike instead of a near-zero LR), and the run reports success.
    Where. forgelm/cli/_resume.py:13-66 (the cited forgelm/trainer.py:1231 was not re-verified), forgelm/trainer.py:1231
    Recommended fix. As part of the resume completeness check, when save_only_model is off, require optimizer.pt (or the sharded or DeepSpeed equivalent) and scheduler.pt. If they are missing, fail or at least WARN, and record the downgrade.

  • CR-A04-085 (code, Info) — Pipeline orchestrator repeats config merges and state/manifest rewrites per transition (measured negligible)
    severity Info · reachability default · intent intended-and-acceptable · confidence likely · single reviewer · reproduced with stubs
    Failure scenario. None that is user-visible. A synthetic 30-stage pipeline with a stubbed trainer made 60 merge_pipeline_stage_config calls, 61 _save_state calls and 62 audit events (each fsynced), and the whole run took 0.11 s. A real stage costs minutes to hours.
    Where. forgelm/cli/_pipeline.py:988, forgelm/cli/_pipeline.py:1083, forgelm/cli/_pipeline.py:1370, forgelm/cli/_pipeline.py:1504
    Recommended fix. No action needed. Optionally cache the _scan_output_dirs merge results for reuse by the stage loop. Expected gain is negligible (milliseconds).

  • CR-A04-086 (code, Info) — forgelm/cli/ holds 13.4K LOC of business logic although the standard calls the CLI a thin shim; operator identity is resolved in three divergent copies
    severity Info · reachability default · intent intended-but-harmful · confidence likely · single reviewer · not reproduced (code trace)
    Failure scenario. The identity formats drift further. Business logic in cli/ is not covered by the compliance and library test seams.
    Where. forgelm/cli/_pipeline.py:1, forgelm/cli/subcommands/_purge.py:1, forgelm/cli/subcommands/_approve.py:121-186, forgelm/compliance.py:192-232
    Recommended fix. Add the pipeline orchestrator to the ownership table or move it, and share one identity helper.

  • CR-A04-087 (code, Info) — Delete and compress checkpoint actions are unreachable from CLI and config
    severity Info · reachability documented-opt-in · intent intended-and-acceptable · confidence likely · single reviewer · reproduced end to end
    Failure scenario. An operator reading architecture.md looks for a way to enable compression in YAML and finds none.
    Where. forgelm/cli/_training.py:152, forgelm/utils.py:57-128, docs/reference/architecture.md:90,175
    Recommended fix. Say 'library API only' in architecture.md or add a config field.

  • CR-A04-088 (code, Info) — Two-stage chain through a real ForgeTrainer on tiny-qwen is feasible offline in seconds and exposes the adapter-chain defect
    severity Info · reachability default · intent intended-and-acceptable · confidence likely · single reviewer · reproduced end to end
    Where. tests/test_pipeline_orchestrator.py:95, tests/test_integration.py:1
    Recommended fix. Add an offline integration test that builds a tiny random Qwen2 model and tokenizer in tmp_path and runs a 2-stage sft->dpo pipeline through the real ForgeTrainer, asserting the stage-2 model carries the stage-1 adapter (or merged weights).

  • CR-A04-089 (code, Info) — Existing tests pin the very designs two verified findings criticise, so their fixes will break or need those tests rewritten
    severity Info · reachability unreachable · intent intended-and-acceptable · confidence likely · single reviewer · reproduced end to end
    Where. tests/test_pipeline_orchestrator.py:927, tests/test_pipeline_orchestrator.py:1353, forgelm/cli/_pipeline.py:527
    Recommended fix. When fixing M-A04-013, change test :927 to write a real approve event; keep a negative test for reject-then-removed staging.

  • CR-A04-090 (code, Info) — Removing lora.use_dora at DEPRECATION_REMOVAL_VERSION turns the dry-run (and training/compliance/model card) into an AttributeError; the removal guard tracks only version strings
    severity Info · reachability unreachable · intent intended-and-acceptable · confidence likely · single reviewer · reproduced (plumbing only)
    Failure scenario. The v1.0.0 removal PR deletes the field but misses one consumer. Every dry-run or training run then crashes with AttributeError. Under the already-reported missing CLI catch-all, that is exit 1 with a traceback and no JSON envelope.
    Where. forgelm/cli/_dry_run.py:53, forgelm/model.py:238, forgelm/model_card.py:222, forgelm/compliance.py:1536
    Recommended fix. Route all consumers through one resolver keyed on lora.method now, so the removal touches only config.py.

  • CR-A04-091 (code, Info) — Several kills are single-test or shallow: M3 and M2 rely on one parametrised class; M5/M6/M7/M8a/M9 each have 1-2 killers
    severity Info · reachability unreachable · intent intended-and-acceptable · confidence likely · single reviewer · reproduced end to end
    Failure scenario. Deleting the single killing test, or its parametrisation, would silently remove protection for M6, M7 or M8a.
    Where. tests/test_pipeline_config.py::TestSafetyConfigTrackCategoriesFieldsSet, tests/test_config.py::TestSafetyGateValidation, tests/test_eu_ai_act.py::TestForgeConfigCompliance, forgelm/config.py:1792-1793
    Recommended fix. No action required. The tests are meaningful, and the redundant allow_inf_nan on min_valid_fraction can be left as defence in depth.

Done when

  • Every finding above is fixed or closed with a reason (tick it here).
  • Code fixes carry a test; doc fixes update the Turkish mirror in the same PR.

Found by the October 2026 ForgeLM code and documentation review against commit cab2947. Code links point at that commit; line numbers may have moved since. Finding IDs (CR-…, DOC-…, TECH-…) are stable references for this backlog.

Activity

  1. added
    bugSomething isn't working
    severity: lowMinor defect, inaccuracy or rough edge
    source: review-2026-10Found by the October 2026 code and documentation review
    wave: 4Roadmap wave 4: low / info / watch, when touching the module
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: pipelineCode area: pipelinebugSomething isn't workingseverity: lowMinor defect, inaccuracy or rough edgesource: review-2026-10Found by the October 2026 code and documentation reviewwave: 4Roadmap wave 4: low / info / watch, when touching the module

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions