Repository navigation
unstructured2graph: make GLiNER2 the default extraction backend across the project - #444
Merged
Merged
Conversation
This was referenced Oct 6, 2026
Merged
…s the project - unstructured2graph declares gliner2[local] as a dependency; the manual-install fallbacks and import suppressions go. - sessions-graph reconcile_session defaults to GLiNER2 over hygm.default_model(), built once per SessionsGraph, and enforces the vocabulary it extracted against. LightRAG stays available as an override and still writes the session summary. - from_documents takes an in-memory ontology, for models held in the graph. - context-graph-eval defaults --extraction-backend to gliner2. gliner2[local] pins transformers<5, so the workspace's CVE-2026-1839 floor is dropped for now; restoring it is tracked in #443.
…o longer the default
antejavor
force-pushed
the
feat/gliner2-default
branch
from
October 7, 2026 13:02
0ea048c to
4354e48
Compare
antejavor
force-pushed
the
feat/gliner2-default
branch
from
October 7, 2026 13:02
0ea048c to
4354e48
Compare
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.
Stacked on #441 (it needs
hygm.default_model()). Once #441 merges, retarget this PR tomainbefore merging it, or it lands on the dead branch.GLiNER2 becomes the default extraction backend everywhere. LightRAG is kept as an override. This is the extraction side of map #431: learned ontologies are derived and applied through GLiNER2.
Changes
gliner2[local]>=2.0.0as a dependency. The manual-install error path and thety: ignoresuppressions on gliner2 imports are removed, andJointIEConfignow gets explicit arguments.from_documents(..., ontology=Ontology)enforces an in-memory ontology, which takes precedence overontology_path. Learned models live in the graph, not in a file.reconcile_session:GLiNER2Backendoverhygm.default_model(), built once perSessionsGraph, since loading the model is the slow part.enforce_ontology, checks labels against the same vocabulary it extracted with, unless anontology_pathoverrides it.reconciliationextra now declareshygm.--extraction-backenddefaults togliner2(over the LongMemEval vocabulary). Saved runs from before the field existed still read aslightrag.Security trade-off (deliberate)
gliner2[local]pinstransformers<5, which can't share the workspace lock with thetransformers>=5.0.0rc3floor for CVE-2026-1839 (an RCE inTrainercheckpoint loading). The floor is dropped, and transformers resolves to 4.57.6. No code in the repo imports transformers or usesTrainer. Restoring the floor is tracked in #443.Tests
Run against a real Memgraph:
The reconciliation tests build the real default backend; only the model checkpoint is stood in for. ruff and the full-workspace
ty check .are clean.