mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
fix: mark some enums as #[non_exhaustive]
This commit is contained in:
@@ -494,6 +494,7 @@ impl SessionBuilder {
|
||||
/// when the offline model is saved. For example, if model has layout optimized for AVX2, the offline model would
|
||||
/// require CPUs that support AVX2.
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
||||
#[non_exhaustive]
|
||||
pub enum GraphOptimizationLevel {
|
||||
/// Disables all graph optimizations.
|
||||
Disable,
|
||||
@@ -604,6 +605,7 @@ impl AsPointer for PrepackedWeights {
|
||||
#[cfg(feature = "api-22")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[non_exhaustive]
|
||||
pub enum AutoDevicePolicy {
|
||||
/// Same as [`Self::PreferCPU`]; ensures broadest compatibility.
|
||||
#[default]
|
||||
|
||||
@@ -206,6 +206,7 @@ impl Drop for Checkpoint {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub enum LearningRateScheduler {
|
||||
Linear {
|
||||
warmup_step_count: i64,
|
||||
|
||||
@@ -3,6 +3,7 @@ use core::fmt;
|
||||
|
||||
/// Enum mapping ONNX Runtime's supported tensor data types.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum TensorElementType {
|
||||
/// 32-bit floating point number, equivalent to Rust's `f32`.
|
||||
Float32,
|
||||
|
||||
Reference in New Issue
Block a user