Skip to content

Record Schema 2.0 update of `atrium_document`

Choose a tag to compare

@github-actions github-actions released this 28 Nov 11:47
· 11 commits to vit since this release
Immutable release. Only release title and notes can be modified.

Major release on top of v1.14.2-beta: the record moves to schema 2.0 (atrium-project#84), so the major version moves.

Changed

  • Record 2.0: page rows are keyed by page_index (the physical page), and page_categories by the baseline's label for that page, else its number. The record carries no run data and no licence.
  • /predict_document's page entries use the record's names: page_index (was page) and page (was page_label).
  • The page selection is recorded (#84 decision 4):
    • the caller sends pages and page_selection (forced+figures, explicit or all, from the hub's shared atrium_page_selection);
    • both, with the rule's statement, go into the paradata parameters, so a page without a category reads as not selected;
    • on the command line: --page-selection.
  • The PDF read is named by distribution (#84 decision 5): rendered-pdf (stored: false) when the original is a DOCX, DOC, ODT or RTF, else original. An empty value is inferred from the baseline's source.media_type; a contradicting one is refused (422 distribution_mismatch).
  • Paradata 3.0 name the upload by distribution name and SHA-512, the record read and the fields written.
  • The command line's config holds its settings and the model folder's name (#84 decision 1c). The images and PDFs it reads and the tables it writes are entries by file name and SHA-512, and parameters.revisions names the revisions used.
  • Fail-fast:
    • with version=all, a model that fails to load or answer fails the request (500);
    • an upload Pillow cannot identify is a 422;
    • YOLO_AUTOINSTALL=false.
  • CI runs on pull requests and releases only (atrium-project#40). The hub's workflows are pinned to ff0a8ea.

Fixed

  • A record updated in place is hashed before it is overwritten; the paradata used to name the new record as the input.
  • The api image stops cleanly while its models are still loading (it could exit with 139).
  • --best recorded the configured main instead of its five models.

Compatibility

  • Records are schema 2.0; a 1.x record is migrated as it is read. Callers of /predict_document read page_index and page.
  • result/paradata/ holds this version's paradata of two demonstration runs over small_data_samples/, beside their tables. The pre-3.0 evaluation paradata are removed.
  • Dependency floors: ultralytics ≥ 8.4.216, pypdfium2 ≥ 5.15.2, timm ≥ 1.0.31, python-multipart ≥ 0.0.34.

Also included, parked during the pilot: supplementary/scripts/decide_brief_job.sh (atrium-project#83). It runs offline and is not run by the service.

Images this release certifies (images.json, atrium-project#81):

  • ghcr.io/ufal/atrium-page-classification:2.0.0-beta = sha256:da43a973678b178a109c7182f4d109679553b44689801def063a760fb3700f43
  • ghcr.io/ufal/atrium-page-classification-api:2.0.0-beta = sha256:47d57d67b0518668503721b38f08320eb711efc1b20979d875deec609e108d77

What's Changed

  • Bump softprops/action-gh-release from 3.0.3 to 3.0.4 in the actions group by @dependabot[bot] in #68
  • Doc schema v2 by @K4TEL in #71
  • Bump the setup-deps group in /setup with 4 updates by @dependabot[bot] in #70
  • Bump pypdfium2 in /service by @dependabot[bot] in #73
  • Update ultralytics requirement from >=8.4.204 to >=8.4.211 in /setup in the pip-deps group across 1 directory by @dependabot[bot] in #72
  • Doc schema v2 refined by @K4TEL in #74
  • Update ultralytics requirement from >=8.4.211 to >=8.4.212 in /setup in the pip-deps group across 1 directory by @dependabot[bot] in #75
  • Documentation and GHA refinements by @K4TEL in #76
  • Bump the pip-deps group across 2 directories with 3 updates by @dependabot[bot] in #77
  • edits for new tag release by @K4TEL in #78
  • ufal/atrium-project#84 decisions 1, 4, 5: page selection recorded, rendered PDF named, batch file entries by @K4TEL in #79

New Contributors

  • @K4TEL made their first contribution in #71

Full Changelog: v1.14.2-beta...v2.0.0-beta