Repository navigation
feat(metadata): add dataset and license vocabularies - #178
Merged
Merged
Conversation
Canonical dataset IDs and SPDX license IDs, with an 'other' escape value. Unlisted values produce warnings in the PR check and the scoring handler, never validation errors, so existing plugin metadata loads.
This was referenced Oct 8, 2026
KartikP
added a commit
that referenced
this pull request
Oct 9, 2026
Every qualifying merge to `main` is versioned and published automatically. There is no bump PR, no approval step and no personal access token. **Release rule** (`.github/workflows/release.yml`, one decision per squash merge) 1. **Path gate:** the merge must change a shipped file. For core that means a file under `brainscore_core/` or the `[project] dependencies` in `pyproject.toml`. Changes only to tests, docs, `.github`, `*.md`, `sqlite3.db` and so on never release, whatever the title says. 2. **Title type:** `feat` gives a minor release; `fix` and `perf` give a patch. Every other allowed type gives no release: `refactor`, `docs`, `test`, `ci`, `chore`, `build`, `plugin`, `model`, `benchmark`, `data`, `metric`. 3. **Major:** needs `!` in the title or a `BREAKING CHANGE` footer, **and** the `major update` label on the PR. Without the label it is downgraded to minor. The workflow computes the level and passes it to python-semantic-release as a forced bump (`force: patch|minor|major`). python-semantic-release then: - updates `version` in `pyproject.toml`; - commits `chore(release): X.Y.Z` with the skip-ci marker; - tags `vX.Y.Z` and pushes to `main` with a GitHub App token (`actions/create-github-app-token`); - builds the sdist and wheel, and creates a GitHub release. A separate `publish` job in the `pypi` environment uploads with `pypa/gh-action-pypi-publish` through trusted publishing (`id-token: write`, no stored PyPI token). The level is forced rather than left to python-semantic-release, because it would otherwise read every commit since the last tag, and a skipped `feat` (for example, a tests-only merge) would leak into the next release. - **Loop guard:** the skip-ci marker on the release commit, plus a job condition that skips head commits starting with `chore(release):`. - **`workflow_dispatch`** with a `level` choice is for the first release and for missed ones. Merging this PR does not release by itself, because it changes no shipped file. Cutting **2.4.0** (feat #172, #177 and #178 since v2.3.8) is one manual run with `minor`. **PR title check** (`.github/workflows/pr-title.yml`, `amannn/action-semantic-pull-request`) - It runs on `pull_request_target` (opened, edited, synchronize, reopened, labeled, unlabeled), so fork PRs get it too. It never checks out PR code, and its only permission is `pull-requests: write`. - On an invalid title it posts one sticky comment showing: - the failing title; - each type with the release it causes; - the major-label rule and the path rule; - the `type(scope): subject` format and three examples. - The comment updates in place on each edit and is deleted once the title passes. - A second sticky comment warns when a breaking title or body has no `major update` label. **Reuse:** both workflows also declare `workflow_call`. Vision and language call them from `main` (`secrets: inherit`), and their only setting is the `release-paths` regex. For vision, for example: `^brainscore_vision/(?!(models|benchmarks|data|metrics)/)`, so plugin-only PRs never release. **Local checks** - Path and title gate on a scratch repo: | Merge | Level | |---|---| | `feat` under `brainscore_core/` | minor | | `feat` only under `tests/` | none | | `fix` | patch | | `docs` in the package | none | | `build(deps)` | none | | `fix(deps)` changing dependencies | patch | | version-only `pyproject` edit | none | | `feat!` without the label | minor | | `feat!` with the label | major | | `plugin` | none | - python-semantic-release 10.7.0 `--noop` on current main: forced patch gives 2.3.9, minor gives 2.4.0, major gives 3.0.0. - The vision regex keeps `model_helpers/` and `__init__.py` as shipped, and excludes `models/`, `benchmarks/` and `metrics/`. - Neither new workflow runs on this PR (push-only and `pull_request_target` read from `main`). Jenkins and `metadata-contract.yml` are unchanged. **Before merging**, complete the one-time setup in the hive note `shared/core_auto_release.md`: the App, the secrets, a ruleset with the App as bypass and the title check required, squash-only merging with the PR title, and the PyPI trusted publisher.
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.
Adds canonical vocabularies for datasets and licenses to the schema 2.0 metadata contract (human decision, 2026-10-08). The web form will read them from core.
What changes
brainscore_core.metadata.vocabularies.DATASETS: 15 canonical dataset IDs, each with a display name and the aliases already present in published metadata.LICENSES: 9 SPDX IDs. These are the SPDX licenses that appear in current metadata, plus the web app's existing display list (licenses.py), so the two agree.OTHER = "other"is the escape value. A dataset usesidentifier: otherwith free text inname. A license usesotherorother: <text>.vocabulary_warnings(document)lists unlisted values and suggests the canonical ID when the value is a known alias.validateandloadare unchanged, so every existing plugin file still loads.vocabulary_warningsfindings (review.py).WARNING:lines on stderr.Effect on current data
The lists are seeded from v2 metadata only, because v1
training_datasetis empty for all 298 vision rows. On visionmasterplus the back-fill branch (135 v2 files), the warnings are:Nothing is rejected.
Dataset variants to canonical IDs (for review)
other: entries that are notes rather than datasets ("not explicit in metadata", "Same as ReAlnet01_cornet") map toother.imagenet-21k).imagenet-1k(ILSVRC-2012).other.brain-score-benchmarksbrain-score-benchmarksbrain-score-benchmarksbrain-score-benchmarksilsvrc-2010imagenet-12kimagenet-12kimagenet-12kimagenet-12k,imagenet-1k(split into one entry each)imagenet-12k,imagenet-1k(split into one entry each)imagenet-12k,imagenet-1k(split into one entry each)imagenet-12k,imagenet-1k(split into one entry each)imagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1kimagenet-1k,brain-score-benchmarks(split into one entry each)imagenet-1k,brain-score-benchmarks(split into one entry each)imagenet-1k,geirhos-cue-conflict(split into one entry each)imagenet-1k,geirhos-cue-conflict,brain-score-benchmarks(split into one entry each)imagenet-1k,instagram-940m(split into one entry each)imagenet-1k,jft-300m(split into one entry each)imagenet-1k,jft-300m(split into one entry each)imagenet-1k,things-eeg2(split into one entry each)imagenet-1k,things-eeg2(split into one entry each)imagenet-1k,things-eeg2(split into one entry each)imagenet-1k,things-eeg2(split into one entry each)imagenet-21kimagenet-21kimagenet-21k,imagenet-1k(split into one entry each)imagenet-21k,imagenet-1k(split into one entry each)laion-2blaion-2blaion-2blaion-aestheticstylized-imagenetstylized-imagenetstylized-imagenet,imagenet-1k(split into one entry each)stylized-imagenet,imagenet-1k(split into one entry each)stylized-imagenet,imagenet-1k(split into one entry each)stylized-imagenet,imagenet-1k,geirhos-cue-conflict(split into one entry each)stylized-imagenet,imagenet-c,imagenet-a,imagenet-1k(split into one entry each)things-eeg2things-eeg2wit-400mwit-400mwit-400mwit-400motherotherotherotherotherotherotherotherotherLicense values to SPDX IDs (for review)
Rule: map to an SPDX ID only when the checkpoint (weights) license is stated. A value that names only the submission code license, or says the weights license is unconfirmed, maps to
other. By that rule, 52 of 72 stored uses map to an SPDX ID.Only the four exact renames are registered as aliases in
LICENSE_ALIASES: Apache 2.0, CC-BY-NC 4.0, GNU GPL v3+ and GNU GPL 3.0+. Values with qualifiers keep their text until the data PR.Apache-2.0BSD-3-ClauseApache-2.0BSD-3-ClauseCC-BY-NC-4.0GPL-3.0-or-laterotherotherotherotherotherApache-2.0otherGPL-3.0-or-laterotherotherotherBSD-3-ClauseotherBSD-3-ClauseCC-BY-NC-SA-4.0otherApache-2.0Apache-2.0Apache-2.0Apache-2.0Apache-2.0Apache-2.0otherotherMITTests
tests/test_metadata/test_vocabularies.py:otherproduce no warning;Local runs:
unittest discover -s tests/test_metadataOK; together withtest_handle_metadata, 27 passed.