Bump the version to 0.3.0. (#1014)

* Bump the version to 0.3.0.

* Changelog update.
This commit is contained in:
Laurent Mazare
2023-10-01 13:51:57 +01:00
committed by GitHub
parent f6054e9d60
commit 096dee7073
20 changed files with 71 additions and 65 deletions

View File

@ -11,7 +11,7 @@ readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
half = { workspace = true }
thiserror = { workspace = true }
intel-mkl-src = { workspace = true, optional = true }

View File

@ -412,26 +412,6 @@ impl<'a> VarBuilder<'a> {
Self::new(Box::new(varmap.clone()), dtype, dev.clone())
}
/// Initializes a `VarBuilder` that retrieves tensors stored in a collection of safetensors
/// data.
#[deprecated(
since = "0.2.3",
note = "use from_mmaped_safetensors or from_buffered_safetensors instead"
)]
pub fn from_safetensors(safetensors: Vec<SafeTensors<'a>>, dtype: DType, dev: &Device) -> Self {
let mut routing = HashMap::new();
for (index, sf) in safetensors.iter().enumerate() {
for k in sf.names() {
routing.insert(k.to_string(), index);
}
}
let tensors = SafeTensorWithRouting {
routing,
safetensors,
};
Self::new(Box::new(tensors), dtype, dev.clone())
}
/// Initializes a `VarBuilder` that retrieves tensors stored in a collection of safetensors
/// files.
///