Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
ONNX_VERSION: v1.22.1
ONNX_VERSION: v1.23.2

jobs:
test:
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ homepage = "https://crates.io/crates/fastembed"
anyhow = { version = "1" }
hf-hub = { version = "0.4.1", default-features = false, optional = true }
image = { version = "0.25.2", optional = true }
ndarray = { version = "0.16", default-features = false }
ort = { version = "=2.0.0-rc.10", default-features = false, features = [
ndarray = { version = "0.17", default-features = false }
ort = { version = "=2.0.0-rc.11", default-features = false, features = [
"ndarray", "std"
] }
safetensors = { version = "0.7" }
Expand All @@ -46,7 +46,7 @@ hf-hub = ["dep:hf-hub", "hf-hub?/ureq"]
hf-hub-native-tls = ["hf-hub", "hf-hub?/native-tls"]
hf-hub-rustls-tls = ["hf-hub", "hf-hub?/rustls-tls"]

ort-download-binaries = ["ort/download-binaries"]
ort-download-binaries = ["ort/download-binaries", "ort/tls-native"]
ort-load-dynamic = ["ort/load-dynamic"]

qwen3 = ["dep:candle-core", "dep:candle-nn", "hf-hub"]
Expand Down
2 changes: 1 addition & 1 deletion src/image_embedding/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl ImageEmbedding {
let inputs_view: Vec<ArrayView3<f32>> = inputs.iter().map(|img| img.view()).collect();
let pixel_values_array = ndarray::stack(ndarray::Axis(0), &inputs_view)?;

let input_name = self.session.inputs[0].name.clone();
let input_name = self.session.inputs()[0].name().to_string();
let session_inputs = ort::inputs![
input_name => Value::from_array(pixel_values_array)?,
];
Expand Down
4 changes: 2 additions & 2 deletions src/reranking/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ use super::{
impl TextRerank {
fn new(tokenizer: Tokenizer, session: Session) -> Self {
let need_token_type_ids = session
.inputs
.inputs()
.iter()
.any(|input| input.name == "token_type_ids");
.any(|input| input.name() == "token_type_ids");
Self {
tokenizer,
session,
Expand Down
4 changes: 2 additions & 2 deletions src/sparse_text_embedding/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl SparseTextEmbedding {
#[cfg_attr(not(feature = "hf-hub"), allow(dead_code))]
fn new(tokenizer: Tokenizer, session: Session, model: SparseModel) -> Self {
let need_token_type_ids = session
.inputs
.inputs()
.iter()
.any(|input| input.name == "token_type_ids");
.any(|input| input.name() == "token_type_ids");
Self {
tokenizer,
session,
Expand Down
4 changes: 2 additions & 2 deletions src/text_embedding/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ impl TextEmbedding {
output_key: Option<OutputKey>,
) -> Self {
let need_token_type_ids = session
.inputs
.inputs()
.iter()
.any(|input| input.name == "token_type_ids");
.any(|input| input.name() == "token_type_ids");

Self {
tokenizer,
Expand Down