Skip to content

docs(dataset-release): state that record ids are stable across releases - #498

Merged
simonvanlierde merged 2 commits into
mainfrom
stable-record-ids
Oct 31, 2026
Merged

simonvanlierde merged 2 commits into
mainfrom
stable-record-ids

Conversation

@simonvanlierde

Copy link
Copy Markdown
Contributor

This states and tests that record ids in the dataset release stay the same across releases. The builder already publishes the database primary key as the id, but nothing stated it and no test pinned it. teardown-classifier splits products by a hash of their id, so a renumbered record would silently move between train and test splits.

  • State in the records.parquet id description and in the release README that a record id is its database primary key, so it stays the same across releases.
  • Add a unit test that builds twice from one in-memory database, the second time with an added product, and checks that every existing record keeps its id and parent id.
  • Add a changelog entry under [Unreleased] for dataset users.
  • Regenerate the docs codebook built from RECORDS_SCHEMA.

Tests:

  • cd backend && uv run --group tests --group dataset-release pytest tests/unit/scripts/test_build_dataset_release.py -q -k stable_id
  • rg -q 'stable' backend/scripts/build_dataset_release.py

- I say in the records.parquet id description and in the release README that a record id is its database primary key, so it stays the same across releases.
- I add a unit test that builds twice from one in-memory database, the second time with an added product, and checks every existing record keeps its id.
- I add a changelog entry for dataset users.

Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com>
… in the test

- I say a record keeps its id in every release that includes it, since a later release can leave out deleted or excluded records.
- I regenerate the docs codebook, which is built from RECORDS_SCHEMA.
- The test now checks parent ids too and says which assertion catches which renumbering bug.

Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com>
@codspeed

codspeed Bot commented Oct 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks


Comparing stable-record-ids (8af90da) with main (8ec88c8)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (4b05eed) during the generation of this report, so 8ec88c8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@simonvanlierde
simonvanlierde merged commit fc0925a into main Oct 31, 2026
25 checks passed
@simonvanlierde
simonvanlierde deleted the stable-record-ids branch October 31, 2026 20:07
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