Skip to content

Commit 4f27510

Browse files
committed
fix bert test and update snapshots
1 parent 4e1df4a commit 4f27510

13 files changed

+14389
-14303
lines changed

Cargo.lock

Lines changed: 69 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backends/candle/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ serde_json = { workspace = true }
2727
memmap2 = "^0.9"
2828

2929
[dev-dependencies]
30-
insta = { git = "https://github.com/OlivierDehaene/insta", rev = "f4f98c0410b91fb5a28b10df98e4422955be9c2c", features = ["yaml"] }
30+
insta = { version = "1.43.2", features = ["yaml", "redactions"] }
3131
is_close = "0.1.3"
3232
hf-hub = { workspace = true, features = ["ureq"] }
3333
anyhow = { workspace = true }

backends/candle/tests/common.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use anyhow::Result;
22
use hf_hub::api::sync::{ApiBuilder, ApiError, ApiRepo};
33
use hf_hub::{Repo, RepoType};
4-
use insta::internals::YamlMatcher;
54
use serde::{Deserialize, Serialize};
65
use std::cmp::max;
76
use std::ops::Deref;
@@ -267,15 +266,6 @@ fn download_dense_module(api: &ApiRepo, dense_path: &str) -> Result<PathBuf, Api
267266
Ok(config_path.parent().unwrap().to_path_buf())
268267
}
269268

270-
#[allow(unused)]
271-
pub(crate) fn relative_matcher() -> YamlMatcher<SnapshotScores> {
272-
YamlMatcher::new()
273-
}
274-
275-
pub fn cosine_matcher() -> YamlMatcher<SnapshotEmbeddings> {
276-
YamlMatcher::new()
277-
}
278-
279269
pub fn load_tokenizer(model_root: &Path) -> Result<Tokenizer> {
280270
// Load tokenizer
281271
let tokenizer_path = model_root.join("tokenizer.json");

0 commit comments

Comments
 (0)