Skip to content

[Feature request] with_session_from_memory support #29

@kipcole9

Description

@kipcole9

In working on a segment-anthing livebook, based upon this forum example, I am downloading the onnx model from hugging face. The benefit is that the Livebook can be readily shared with no dependencies.

Currently it needs to be saved to a file system before calling Ortext.load/1 since that function ultimately delegates to the following in model.rs:

    let session = Session::builder()?
        .with_execution_providers(&eps)?
        .with_optimization_level(map_opt_level(opt))?
        .with_model_from_file(model_path)?;

A version or an option which calls .with_model_from_memory(binary) would be a valuable, and hopefully a simple addition.

I think Livebooks is a likely a common use case so hopefully something you might consider. I would happily send a PR if I had any relevant skill, but in Rust I do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions