es-ude / es-ude/OnDeviceTraining

serial: ODTR container version has no formal linkage to the embedded ODTS tensor-record version

Open
#401 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
1
Forks
3
Avg merge
1d 1h
Merged PRs (30d)
8

Description

Found in group-quant PR1 review (pre-existing):

`PPCA_SERIALIZE_FORMAT_VERSION` (ODTR, currently 2) is independent of the ODTS tensor-record layout it embeds via `serializeTensor`/`deserializeTensor`. When the ODTS record layout changes (as in the group-quant v3→v4 SYM change), an OLD ODTR checkpoint containing a SYM tensor still passes the container's version check and is parsed against the NEW layout. Today this fails safe only incidentally (downstream qBits/numGroups guards trip on the misaligned read) — there is no deliberate contract.

Fix options: (a) embed the ODTS record version in the ODTR header and validate on load, or (b) policy: bump PPCA_SERIALIZE_FORMAT_VERSION on every ODTS record-layout bump (documented coupling). (a) preferred — self-describing beats convention. Related: the peek-parser dedup issue.

Contributor guide

Open the contributing guide

Research direction

Start by tracing PPCA_SERIALIZE_FORMAT_VERSION and the serializeTensor/deserialzeTensor paths in the ODTR and ODTS serialization code. Compare how the current ODTR header is written and validated during loading, then determine how the embedded ODTS version should be represented or coupled. Done means an OLD ODTR checkpoint cannot be parsed against an incompatible ODTS layout and the contract is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.