Skip to content

Fail when models are partially initialised and add a new more informative health api entry #1373

Merged
lfoppiano merged 2 commits into
masterfrom
improvements/fails-on-failures
Mar 4, 2026
Merged

Fail when models are partially initialised and add a new more informative health api entry #1373
lfoppiano merged 2 commits into
masterfrom
improvements/fails-on-failures

Conversation

@lfoppiano

Copy link
Copy Markdown
Member

This PR addresses the issue in #1372.

  1. We improved the /api/isalive to return false when a mode is not working (e.g. jep initialisation error)
  2. We added a new /api/health that returns more detailed information of the status of grobid
{
  "initialized": false,
  "ready": false,
  "pool": {
    "initialized": true,
    "active": 0,
    "idle": 0,
    "maxActive": 10
  },
  "models": {
    "loaded": {
      "table": "wapiti",
      "name-citation": "wapiti",
      "date": "wapiti",
      "figure": "wapiti",
      "affiliation-address": "wapiti",
      "segmentation": "wapiti",
      "reference-segmenter": "wapiti",
      "funding-acknowledgement": "wapiti",
      "fulltext": "wapiti",
      "name-header": "wapiti",
      "citation": "wapiti"
    },
    "failed": {
      "header": "JEP initialization failed"
    },
    "totalLoaded": 11,
    "totalFailed": 1
  },
  "grobidHomeConfigured": true,
  "initializationError": "Models failed to load: header"
}

@lfoppiano lfoppiano merged commit f41cd9f into master Mar 4, 2026
7 checks passed
@lfoppiano lfoppiano deleted the improvements/fails-on-failures branch March 4, 2026 20:47
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