Skip to content

Commit

Permalink
Update Deps incuding HF-hub (#103)
Browse files Browse the repository at this point in the history
* bump deps

* cand;e_hf_hub- -> hf-hub
  • Loading branch information
zachcp authored Jan 5, 2025
1 parent 208a766 commit 830a3a8
Show file tree
Hide file tree
Showing 12 changed files with 219 additions and 159 deletions.
348 changes: 204 additions & 144 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ anyhow = "1.0"
bitflags = "2.6.0"
candle-core = "0.8.1"
candle-examples = "0.8.1"
candle-hf-hub = "0.3.3"
candle-metal-kernels = "0.8.1"
candle-nn = "0.8.1"
candle-transformers = "0.8.1"
hf-hub = "0.4.1"
itertools = "0.14.0"
once_cell = "1.20.2"
pdbtbx = "0.12.0"
Expand Down
2 changes: 1 addition & 1 deletion ferritin-bevy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
description.workspace = true

[dependencies]
bevy = "0.15.0"
bevy = "0.15.1"
bon = "3.3.2"
ferritin-core = { path = "../ferritin-core" }
pdbtbx.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions ferritin-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ metal = ["candle-core/metal", "candle-nn/metal", "candle-metal-kernels"]

[dependencies]
anyhow.workspace = true
bevy = "0.15.0"
bevy = "0.15.1"
candle-core.workspace = true
candle-hf-hub.workspace = true
candle-metal-kernels = { workspace = true, optional = true }
candle-nn.workspace = true
clap = { version = "4.5.23", features = ["derive"] }
ferritin-bevy = { path = "../ferritin-bevy" }
ferritin-core = { path = "../ferritin-core" }
ferritin-plms = { path = "../ferritin-plms" }
ferritin-onnx-models = { path = "../ferritin-onnx-models" }
hf-hub.workspace = true
ndarray = "0.16"
ort = "=2.0.0-rc.9"
pdbtbx.workspace = true
Expand All @@ -39,8 +39,8 @@ tokenizers = { version = "0.21.0", default-features = false, features = [
] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
candle-hf-hub = { workspace = true }
tokenizers = { version = "0.21.0" } # full features for non-wasm
hf-hub.workspace = true
tokenizers = { version = "0.21.0" } # full features for non-wasm


[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion ferritin-examples/examples/esm2/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use anyhow::{Error as E, Result};
use candle_core::safetensors::load;
use candle_core::{DType, Tensor};
use candle_examples::device;
use candle_hf_hub::{api::sync::Api, Repo, RepoType};
use candle_nn::VarBuilder;
use clap::Parser;
use ferritin_plms::{ESM2Config as Config, ESM2};
use hf_hub::{api::sync::Api, Repo, RepoType};
use tokenizers::Tokenizer;

pub const DTYPE: DType = DType::F32;
Expand Down
2 changes: 1 addition & 1 deletion ferritin-examples/examples/esmc/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::Result;
use candle_core::pickle::PthTensors;
use candle_core::{DType, Device};
use candle_hf_hub::{api::sync::Api, Repo, RepoType};
use candle_nn::VarBuilder;
use hf_hub::{api::sync::Api, Repo, RepoType};
use ferritin_plms::{ESMCConfig, ESMC};

// pub fn esmc_300m_202412(device: &Device) -> Result<Box<dyn Model>> {
Expand Down
4 changes: 2 additions & 2 deletions ferritin-onnx-models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ description.workspace = true
anyhow.workspace = true
candle-core.workspace = true
candle-nn.workspace = true
candle-hf-hub.workspace = true
hf-hub.workspace = true
ndarray = "0.16"
ndarray-safetensors = "0.2.0"
ndarray-safetensors = "0.2.1"
ort = "=2.0.0-rc.9"
safetensors.workspace = true
serde.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion ferritin-onnx-models/src/models/amplify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! - [Paper](https://www.biorxiv.org/content/10.1101/2024.09.23.614603v1)
//!
use anyhow::{anyhow, Result};
use candle_hf_hub::api::sync::Api;
use hf_hub::api::sync::Api;
use std::path::PathBuf;
use tokenizers::Tokenizer;

Expand Down
2 changes: 1 addition & 1 deletion ferritin-onnx-models/src/models/esm2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use super::super::utilities::ndarray_to_tensor_f32;
use anyhow::{anyhow, Result};
use candle_core::{Tensor, D};
use candle_hf_hub::api::sync::Api;
use candle_nn::ops;
use ferritin_plms::types::PseudoProbability;
use hf_hub::api::sync::Api;
use ndarray::Array2;
use ort::{
execution_providers::CUDAExecutionProvider,
Expand Down
2 changes: 1 addition & 1 deletion ferritin-onnx-models/src/models/ligandmpnn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
use crate::{ndarray_to_tensor_f32, tensor_to_ndarray_f32, tensor_to_ndarray_i64};
use anyhow::Result;
use candle_core::{Device, Tensor};
use candle_hf_hub::api::sync::Api;
use candle_nn::ops;
use ferritin_core::{AtomCollection, StructureFeatures};
use ferritin_plms::ligandmpnn::utilities::int_to_aa1;
use ferritin_plms::types::PseudoProbability;
use hf_hub::api::sync::Api;
use ndarray::ArrayBase;
use ort::{
execution_providers::CUDAExecutionProvider,
Expand Down
2 changes: 1 addition & 1 deletion ferritin-plms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ metal = [
[dependencies]
anyhow.workspace = true
candle-core.workspace = true
candle-hf-hub.workspace = true
candle-metal-kernels = { workspace = true, optional = true }
candle-nn.workspace = true
candle-transformers.workspace = true
clap = { version = "4.5", features = ["derive"] }
ferritin-core = { path = "../ferritin-core" }
ferritin-test-data = { path = "../ferritin-test-data" }
hf-hub.workspace = true
itertools.workspace = true
pdbtbx.workspace = true
rand.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion ferritin-plms/src/amplify/amplify_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use super::config::AMPLIFYConfig;
use super::outputs::ModelOutput;
use anyhow::{anyhow, Error as E, Result};
use candle_core::{DType, Device, Tensor, D};
use candle_hf_hub::{api::sync::Api, Repo, RepoType};
use candle_nn::ops;
use candle_nn::VarBuilder;
use hf_hub::{api::sync::Api, Repo, RepoType};
use tokenizers::Tokenizer;

pub enum AmplifyModels {
Expand Down

0 comments on commit 830a3a8

Please sign in to comment.