Expand description
The model tiers’ shared surface, re-exported from pdf-engine: the model
specs, the failure types and the install paths (#641).
One definition and not a facade copy, for the reason the block model is
re-exported rather than mirrored: a caller matching a model::ModelError
from the facade and one from the engine must be matching the same type.
The model tiers’ shared surface: specs, failures and install paths (#641).
Always compiled; only the session half needs the ort feature.
The model tiers’ shared surface: specs, failures and install paths (#641).
Always compiled, with or without the ort-layout cargo feature: the
specs, the failure types and the path resolution of the shared ONNX
Runtime layer are plain Rust, so a build without the tier still reports a
missing model with the typed ModelError rather than a string. Only
the session half of pdf_ocr::runtime – init, builder, session,
SharedSession – needs the ort feature and the ort crate.
LAYOUT_EP03 is the balanced tier’s model. [balanced_unavailable]
is what Quality::Balanced answers on a build without
the tier.
Structs§
- Model
Error - A shared-layer failure.
- Model
Spec - What a model package must provide.
- Runtime
Config - How the shared layer resolves files and sizes its pools.
Enums§
- Model
Error Kind - What went wrong, in one of the two failure kinds the layer reports.
Constants§
- LAYOUT_
EP03 - The layout model: Heron-ft ep03 (RT-DETRv2), ONNX export.
- ORT_
VERSION - The exact ONNX Runtime version this layer runs against.
- TABLES_
TATR - The tables model: TATR v1.1-all (Table Transformer structure), ONNX export.
Functions§
- default_
model_ root - The per-user model root:
<data dir>/pdfluent/models/, where the install commands put packages. - model_
error - Find the
ModelErrorin an error chain, if there is one. - resolve_
model_ file - Resolve the model file:
resolve_model_rootplus<spec.name>/<spec.file>, reported even when it is not there. - resolve_
model_ root - Resolve the model root: explicit dir, then
PDFLUENT_MODEL_DIR, then the per-user default. An empty env var counts as unset, matchingort’s own reading ofORT_DYLIB_PATH. - resolve_
ort_ dylib - Resolve the runtime library: explicit path, then
ORT_DYLIB_PATH, then<model dir>/onnxruntime-<version>/<platform library>, where the model dir isPDFLUENT_MODEL_DIRor the per-user default.