pub struct OnnxChecker { /* private fields */ }Expand description
The standard, extensible checker (ONNX_RS §8.2).
Construct with OnnxChecker::new for the built-in rule set, or
OnnxChecker::empty to build a custom set from scratch. Add organisation-
specific rules with OnnxChecker::add_rule (§8.3) and turn individual
rules off with OnnxChecker::disable_rule.
Implementations§
Source§impl OnnxChecker
impl OnnxChecker
Sourcepub fn with_schema_registry(schemas: SchemaRegistry) -> Self
pub fn with_schema_registry(schemas: SchemaRegistry) -> Self
A standard checker using a caller-provided schema registry.
Sourcepub fn add_rule<R: ValidationRule + 'static>(&mut self, rule: R)
pub fn add_rule<R: ValidationRule + 'static>(&mut self, rule: R)
Register a custom rule (ONNX_RS §8.3).
Sourcepub fn disable_rule(&mut self, rule_id: &str)
pub fn disable_rule(&mut self, rule_id: &str)
Disable a rule by id; disabled rules are skipped during Self::check.
Sourcepub fn check(&self, model: &Model) -> ValidationResult
pub fn check(&self, model: &Model) -> ValidationResult
Run all enabled rules and aggregate the result.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OnnxChecker
impl !UnwindSafe for OnnxChecker
impl Freeze for OnnxChecker
impl Send for OnnxChecker
impl Sync for OnnxChecker
impl Unpin for OnnxChecker
impl UnsafeUnpin for OnnxChecker
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
Mutably borrows from an owned value. Read more