Skip to content

Commit

Permalink
compiling but outdated onnxruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellflitton committed Sep 17, 2024
1 parent 62ba598 commit 29fc925
Show file tree
Hide file tree
Showing 19 changed files with 155 additions and 317 deletions.
8 changes: 2 additions & 6 deletions modules/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ license-file = "LICENSE"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
axum-feature = ["axum"]
actix-feature = ["actix-web"]
default = []
# below are the features for testing different engines
sklearn-tests = []
Expand All @@ -20,7 +18,7 @@ tensorflow-tests = []

[dependencies]
regex = "1.9.3"
ort = { version = "1.16.2", features = ["load-dynamic"], default-features = false }
ort = { version = "2.0.0-rc.5", features = ["load-dynamic", "ndarray"], default-features = false }
ndarray = "0.15.6"
once_cell = "1.18.0"
bytes = "1.5.0"
Expand All @@ -29,9 +27,7 @@ futures-core = "0.3.28"
thiserror = "1.0.57"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0"
axum = { version = "0.7.4", optional = true }
actix-web = { version = "4.5.1", optional = true }

nanoservices-utils = "0.1.5"

[dev-dependencies]
tokio = { version = "1.12.0", features = ["full"] }
Expand Down
20 changes: 20 additions & 0 deletions modules/core/src/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#[macro_export]
macro_rules! safe_eject_option {
($check:expr) => {
match $check {Some(x) => x, None => {let file_track = format!("{}:{}", file!(), line!());let message = format!("{}=>The value is not found", file_track);return Err(NanoServiceError::new(message, NanoServiceErrorStatus::NotFound))}}
};
}


#[macro_export]
macro_rules! safe_eject_internal {
// Match when the optional string is provided
($e:expr, $err_status:expr, $msg:expr) => {
$e.map_err(|x| {let file_track = format!("{}:{}", file!(), line!()); let formatted_error = format!("{} => {}", file_track, x.to_string()); NanoServiceError::new(formatted_error, NanoServiceErrorStatus::Unknown)})?
};
// Match when the optional string is not provided
($e:expr) => {
$e.map_err(|x| {let file_track = format!("{}:{}", file!(), line!()); let formatted_error = format!("{} => {}", file_track, x.to_string()); NanoServiceError::new(formatted_error, NanoServiceErrorStatus::Unknown)})?
};
}
57 changes: 0 additions & 57 deletions modules/core/src/errors/actix.rs

This file was deleted.

44 changes: 0 additions & 44 deletions modules/core/src/errors/axum.rs

This file was deleted.

101 changes: 0 additions & 101 deletions modules/core/src/errors/error.rs

This file was deleted.

7 changes: 0 additions & 7 deletions modules/core/src/errors/mod.rs

This file was deleted.

Loading

0 comments on commit 29fc925

Please sign in to comment.