#[non_exhaustive]pub struct TatrOptions {
pub model_dir: Option<PathBuf>,
pub ort_dylib: Option<PathBuf>,
pub intra_threads: usize,
pub sessions_per_model: usize,
pub detector_regions_only: bool,
/* private fields */
}Expand description
TATR table structure, opted into per call (track B, P3).
Set on ExtractOptions with ExtractOptions::with_tatr. When set,
every table region is offered to the Table Transformer first: where it
fires its cells are the region’s table, and where it does not the current
grid runs unchanged. Unset, extraction never touches the model and reads
byte for byte as without the option.
The knobs mirror the shared layer’s RuntimeConfig without naming it:
that type only exists behind the ort feature, and
this one must exist on every build so the option, its refusal, and the
test seam below compile everywhere. Behind ort-tables the engine builds
the runtime config from these fields; without it, asking for TATR is an
OptionsError::TatrNeedsOrtTables, never a silent fast run.
#[non_exhaustive], like every option type here: start from Default
and assign the fields. All fields are Eq, so ExtractOptions keeps
its Eq.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model_dir: Option<PathBuf>Explicit model dir; wins over the env var and the default, as the
shared layer’s model_dir does. Default None: resolve it there.
ort_dylib: Option<PathBuf>Explicit ONNX Runtime library; wins over the env var and the
default. Default None: resolve it there.
intra_threads: usizeONNX Runtime intra-op threads per session. Default 4.
sessions_per_model: usizeSessions per model: a pool so parallel pages do not serialise on one session. Default 1.
detector_regions_only: boolTATR acts only on regions from a detector or teacher box. Default
false: every region [crate::learned::tables::rebuild_region]
rebuilds is offered to TATR, whether the learned pass or a teacher
box drew it. The switch P4 restricts with once the detector lands.
Trait Implementations§
Source§impl Clone for TatrOptions
impl Clone for TatrOptions
Source§impl Debug for TatrOptions
impl Debug for TatrOptions
Source§impl Default for TatrOptions
impl Default for TatrOptions
impl Eq for TatrOptions
Source§impl PartialEq for TatrOptions
impl PartialEq for TatrOptions
impl StructuralPartialEq for TatrOptions
Auto Trait Implementations§
impl Freeze for TatrOptions
impl RefUnwindSafe for TatrOptions
impl Send for TatrOptions
impl Sync for TatrOptions
impl Unpin for TatrOptions
impl UnsafeUnpin for TatrOptions
impl UnwindSafe for TatrOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().