Skip to content

Commit

Permalink
Fixed issue where the default revision is always the one we picked fo…
Browse files Browse the repository at this point in the history
…r the default model
  • Loading branch information
dureuill committed Dec 20, 2023
1 parent fb9db1e commit 333ce12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions milli/src/vector/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ impl From<HfEmbedderSettings> for crate::vector::hf::EmbedderOptions {
let mut this = Self::default();
if let Some(model) = model.set() {
this.model = model;
// Reset the revision if we are setting the model.
// This allows the following:
// "huggingFace": {} -> default model with default revision
// "huggingFace": { "model": "name-of-the-default-model" } -> default model without a revision
// "huggingFace": { "model": "some-other-model" } -> most importantly, other model without a revision
this.revision = None;
}
if let Some(revision) = revision.set() {
this.revision = Some(revision);
Expand Down

0 comments on commit 333ce12

Please sign in to comment.