Onnx Feature - Loading Model from Object Storage #1974
Replies: 3 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
I don't like this format. I would standardize the file loading across Dozer, whether is onnx or wasm and use URI formats. Also I would consider using https://github.com/apache/incubator-opendal or something similar so we can support any type of file storage at once. |
Beta Was this translation helpful? Give feedback.
-
|
Utilizing opendal will consist of following steps:
list of supported object store services - https://github.com/apache/incubator-opendal/tree/main/core/src/services Opendal uses its own enum Result<T, E> {
Ok(T),
Err(E),
}
async fn read_data(op: Operator) -> Result<()> {
let bs = op.read("test").await?;
println!("data: {}", String::from_utf8_lossy(&bs));
Ok(())
}S3fn init() -> Result<Operator> {
let mut builder = S3::default();
builder.bucket("example");
builder.access_key_id("access_key_id");
builder.secret_access_key("secret_access_key");
builder.region("us-east-1");
let op = Operator::new(builder)?.finish();
Ok(op)
}config changes (optional) config: !S3Stroage
details:
# optional
access_key_id: {{YOUR_ACCESS_KEY}}
# optional
secret_access_key: {{YOUR_SECRET_KEY}}
region: {{YOUR_REGION}}
bucket_name: {{YOUR_BUCKET_NAME}}
path: ./models/model_fileIn-memoryfn init() -> Result<Operator> {
let mut builder = Memory::default();
builder.root("/tmp");
let op: Operator = Operator::new(builder)?.finish();
Ok(op)
}config changes (optional) config: !LocalStorage
details:
path: data/zones/taxi_zone_lookup.csv |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current Onnx Model Configuration Format
Proposed New Format which is reusable
Original Object Storage Configuration Format
Beta Was this translation helpful? Give feedback.
All reactions