Skip to content

render_experiment_docs.py's RVQ deploy-artifact list may reference sample_stimulus.npz when only sample_data.npz exists #60

Description

@apage224

Summary

Flagged by Copilot review on PR #59 (unrelated to that PR's actual diff -- pre-existing).

`scripts/render_experiment_docs.py`'s "Deploy Artifacts" section for RVQ experiments lists `sample_stimulus.npz` as one of the canonical local deploy artifacts. But `compressionkit/export/deploy.py::export_for_deployment()` (called directly by the RVQ training recipe, `compressionkit/recipes/base_rvq.py`) only ever writes `sample_data.npz` locally -- `sample_stimulus.npz` is only produced by the separate `compressionkit/experiments/repackage.py::repackage_rvq_golden()` path (used by `compressionkit golden repackage `), via its own `export_stimulus_npz()` call.

So depending on which code path produced a given local `results//deploy/` directory:

  • Trained via the normal recipe (`base_rvq.py`) only: has `sample_data.npz`, no `sample_stimulus.npz`.
  • Repackaged via `compressionkit golden repackage`: has both.

`sample_stimulus.npz` IS always the correct name for what ends up published to HuggingFace (`RVQ_HF_FILE_RENAMES` maps `sample_data.npz -> sample_stimulus.npz`), so the doc text isn't wrong about the published artifact name -- it's ambiguous about whether it's describing local or published naming, and every currently-regenerated local deploy dir happens to have both files (since all 11 RVQ goldens were repackaged via the `golden repackage` path in PR #59), which is masking the inconsistency.

Proposed follow-up

  • Decide: should `render_experiment_docs.py`'s "Deploy Artifacts" section describe local (`results/.../deploy/`) naming or HF-published naming consistently for every family (currently it mixes both: `encoder.tflite`/`decoder.tflite` are local names, but `sample_stimulus.npz` is the published name)?
  • Consider whether `export_for_deployment()` itself should always write `sample_stimulus.npz` (or a symlink to `sample_data.npz`) so the "produces the canonical edge deploy package" claim is accurate regardless of which code path (training recipe vs `golden repackage`) built the package.

Context

Found during Copilot review of PR #59 (RVQ encoder/decoder .keras publishing). Not a regression from that PR -- the sample_stimulus.npz bullet point already existed before, and this issue is about a pre-existing local-vs-published naming ambiguity in that same generated doc section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions