Skip to content
Open
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
7 changes: 5 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions backends/candle/tests/test_bert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ fn test_emotions() -> Result<()> {

let matcher = relative_matcher();

let predictions: Vec<Vec<f32>> = backend
.predict(input_batch)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_batch)?.into_values().collect();
let predictions_batch = SnapshotScores::from(predictions);
insta::assert_yaml_snapshot!("emotions_batch", predictions_batch, &matcher);

Expand All @@ -177,9 +175,7 @@ fn test_emotions() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();
let predictions_single = SnapshotScores::from(predictions);

insta::assert_yaml_snapshot!("emotions_single", predictions_single, &matcher);
Expand Down Expand Up @@ -217,9 +213,7 @@ fn test_bert_classification() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();
let predictions_single = SnapshotScores::from(predictions);

let matcher = relative_matcher();
Expand Down
7 changes: 2 additions & 5 deletions backends/candle/tests/test_dense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ fn test_stella_en_400m_v5_default_dense() -> Result<()> {
#[test]
#[serial_test::serial]
fn test_stella_en_400m_v5_dense_768() -> Result<()> {
let (model_root, dense_paths) = download_artifacts(
"dunzhang/stella_en_400M_v5",
None,
Some("2_Dense_768"),
)?;
let (model_root, dense_paths) =
download_artifacts("dunzhang/stella_en_400M_v5", None, Some("2_Dense_768"))?;
let tokenizer = load_tokenizer(&model_root)?;

let backend = CandleBackend::new(
Expand Down
4 changes: 1 addition & 3 deletions backends/candle/tests/test_gte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ fn test_gte_classification() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();
let predictions_single = SnapshotScores::from(predictions);

let matcher = relative_matcher();
Expand Down
4 changes: 1 addition & 3 deletions backends/candle/tests/test_jina.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ fn test_jina_rerank() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();

let predictions = SnapshotScores::from(predictions);
insta::assert_yaml_snapshot!("jinabert_reranker_single", predictions, &relative_matcher());
Expand Down
8 changes: 2 additions & 6 deletions backends/candle/tests/test_modernbert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ fn test_modernbert_classification() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();
let predictions_single = SnapshotScores::from(predictions);

let matcher = relative_matcher();
Expand Down Expand Up @@ -231,9 +229,7 @@ fn test_modernbert_classification_mean_pooling() -> Result<()> {
vec![],
);

let predictions: Vec<Vec<f32>> = backend
.predict(input_single)?.into_values()
.collect();
let predictions: Vec<Vec<f32>> = backend.predict(input_single)?.into_values().collect();
let predictions_single = SnapshotScores::from(predictions);

let matcher = relative_matcher();
Expand Down
1 change: 1 addition & 0 deletions router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ tokio-stream = { version = "0.1.14", optional = true }
# Optional
cudarc = { workspace = true, optional = true }
intel-mkl-src = { workspace = true, optional = true }
uuid = { version = "1.19.0", features = ["v4"] }

# Malloc trim hack for linux
[target.'cfg(target_os = "linux")'.dependencies]
Expand Down
Loading
Loading