Skip to content

feat(submission): link model references through a DomainPlugins bibtex hook - #182

Merged
KartikP merged 2 commits into
mainfrom
kp/attach-model-reference
Oct 12, 2026
Merged

KartikP merged 2 commits into
mainfrom
kp/attach-model-reference

Conversation

@KartikP

@KartikP KartikP commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Scored models never get a reference (paper citation) in the database.

Changes

  • New DomainPlugins.load_model_bibtex(identifier) -> Optional[str], returning None by default. RunScoringEndpoint passes its result to modelentry_from_model, instead of reading model.bibtex, which no domain's model objects have. Domains opt in by overriding it, and model objects are never changed. The early load_model call stays, so a model that fails to load still fails before any score row is created.
  • modelentry_from_model links the reference whenever bibtex is given and the row has no reference yet. Before, it did this only when the row was first created. An existing reference is never replaced.
  • reference_from_bibtex falls back to https://doi.org/<doi> when the bibtex has no url. A doi written with a https://doi.org/ or doi: prefix is stripped first, so the url is not doubled.

Tests

  • Database tests: fill an existing row, keep an existing reference, doi fallback, doi prefix not doubled.
  • Endpoint tests: the hook links the reference; the default hook leaves it None.
  • Local sqlite run: 17 passed.

Release
feat:, because it adds a public hook: minor release (2.5.0). vision#2597 overrides the hook and needs this release.

Context
The 13 mehrer2020_alexnet_training_seed_* prod rows were back-filled by hand (reference 165).

modelentry_from_model only linked a reference when the Model row was
created, so a model scored before its bibtex was known never got one.
Link it whenever bibtex is given and the row has none. Plugin bibtex
often has a doi but no url, which made reference_from_bibtex fail; fall
back to the doi.org url.
Scoring read model.bibtex, which domain models do not have. Add
DomainPlugins.load_model_bibtex (None by default) and pass its result to
modelentry_from_model, so domains opt in without mutating model objects.
Also strip a doi.org or doi: prefix before building the doi fallback url.
@KartikP KartikP changed the title fix(submission): attach the model reference to existing rows feat(submission): link model references through a DomainPlugins bibtex hook Oct 12, 2026
@KartikP
KartikP marked this pull request as ready for review October 12, 2026 14:53
@KartikP
KartikP merged commit 4679ab1 into main Oct 12, 2026
5 checks passed
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