fix: --export-rvf no longer silently produces a placeholder model#920
Merged
Conversation
The --export-rvf handler ran *before* the --train/--pretrain handlers and unconditionally wrote placeholder sine-wave weights, then returned. So the documented `--train --dataset … --export-rvf <path>` workflow (user-guide.md) short-circuited to a PLACEHOLDER model and never trained — printing "exported successfully" for a non-functional model. Given the project's anti-"is it fake" stance, silently emitting a fake model is the wrong default. Fix: - Only emit the placeholder container-format demo when --export-rvf is used *standalone* (new `export_emits_placeholder_demo` guard). With --train/--pretrain, fall through so the real training pipeline runs and exports calibrated weights. - The standalone path now prints a clear WARNING that it writes a container-format demo with placeholder weights — not a trained model — pointing to --train / a pretrained encoder (#894). - Docs: flag --export-rvf as a placeholder demo in the flag table, and fix the Docker training example to use --save-rvf (consistent with the from-source example) instead of the placeholder --export-rvf. 3 unit tests for the guard. Full crate unit suite: 429 + 117 passed, 0 failed. Co-Authored-By: claude-flow <ruv@ruv.net>
ruvnet
added a commit
that referenced
this pull request
Jun 3, 2026
Per the CLAUDE.md pre-merge checklist (item 5, "Add entry under [Unreleased]"), several recently-merged PRs landed without CHANGELOG entries. Backfilling the user/operator-facing ones — most importantly the MAT triage safety fix: - #926 (Security/safety): survivor with a heartbeat never triaged Deceased - #918: per-node HA devices report each node's own presence/motion - #919: actionable --model load diagnostic (refs #894) - #920: --export-rvf no longer silently produces a placeholder model - #929 (Security): bearer scheme matched case-insensitively (RFC 6750) CI-internal fixes (#925 rust-cache, #930 SAST) are intentionally omitted — they don't change product behavior. Docs-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug (honesty-critical)
main()checks handlers in order:--benchmark, then--export-rvf, then--pretrain, then--train. The--export-rvfbranch wrote placeholder sine-wave weights ((i as f32 * 0.001).sin()) andreturned.So the workflow documented in the user guide:
…hit the
--export-rvfshort-circuit before--train, wrote a placeholder model, and never trained — while printingRVF container exported successfully.A user following the docs gets a non-functional model that looks real. For a project that explicitly fights "is it fake?" claims, silently shipping a fake model is the wrong default.Fix
export_emits_placeholder_demo(export_set, train, pretrain)guard: emit the placeholder container-format demo only when--export-rvfis used standalone. With--train/--pretrain, fall through so the real training pipeline runs and exports calibrated weights.--train/ a pretrained encoder (Pre-trained model from HuggingFace cannot be loaded: incompatible RVF format #894).--export-rvfflagged as a placeholder demo in the flag table; the Docker training example switched to--save-rvf(consistent with the from-source example just above it).Tests
3 unit tests (
export_rvf_mode_tests): standalone → demo;+train/+pretrain→ no short-circuit; no flag → never.Verification
cargo build -p wifi-densepose-sensing-server --no-default-featuresclean; full crate unit suite 429 + 117 passed, 0 failed.Related: #894 (no real trained-weights→loadable-RVF path is the deeper gap; this stops the placeholder masquerade).
🤖 Generated with claude-flow