Skip to content

Commit 43a3cfc

Browse files
authored
chore: deps bumps and test fixes (#149)
* bump crates * small bumps * update rerun * update Cargo toml * update deps * remove rerun * - update ORT and ndarray - remove rerun - fix cargo check issues * update ball and stick mesh creation
1 parent 2b23d7c commit 43a3cfc

14 files changed

Lines changed: 2989 additions & 8095 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ license = "MIT OR Apache-2.0"
2323
edition = "2024"
2424

2525
[workspace.dependencies]
26-
anyhow = "1.0"
27-
bevy = { version = "0.16.1", default-features = false }
28-
bon = "3.6.4"
29-
candle-core = "0.9.1"
30-
candle-metal-kernels = "0.9.1"
31-
candle-nn = "0.9.1"
32-
candle-onnx = "0.9.1"
33-
candle-transformers = "0.9.1"
34-
clap = { version = "4.5.40", features = ["derive"] }
35-
hf-hub = "0.4.2"
26+
anyhow = "1.0.100"
27+
bevy = { version = "0.17.2", default-features = false }
28+
bon = "3.8.1"
29+
candle-core = "0.9.2-alpha.1"
30+
candle-metal-kernels = "0.9.2-alpha.1"
31+
candle-nn = "0.9.2-alpha.1"
32+
candle-onnx = "0.9.2-alpha.1"
33+
candle-transformers = "0.9.2-alpha.1"
34+
clap = { version = "4.5.51", features = ["derive"] }
35+
hf-hub = "0.4.3"
3636
itertools = "0.14.0"
37-
ndarray = "0.16"
38-
ort = "=2.0.0-rc.10"
39-
rerun = "0.23.3"
40-
serde = { version = "1.0", features = ["derive"] }
41-
serde_json = "1.0.140"
42-
strum = { version = "0.27", features = ["derive"] }
43-
tempfile = "3.20.0"
44-
tokenizers = { version = "0.21.1", features = ["onig"] }
37+
ndarray = "0.17"
38+
ort = { git = "https://github.com/pykeio/ort" }
39+
# rerun = "0.26"
40+
serde = { version = "1.0.228", features = ["derive"] }
41+
serde_json = "1.0.145"
42+
strum = { version = "0.27.2", features = ["derive"] }
43+
tempfile = "3.23.0"
44+
tokenizers = { version = "0.22.1", features = ["onig"] }

crates/ferritin-examples/Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ license.workspace = true
77
description.workspace = true
88

99
[features]
10-
default = ["plms", "mesh"]
10+
default = ["plms", "mesh", "bevy"]
11+
bevy = []
1112
metal = ["candle-core/metal", "candle-nn/metal", "candle-metal-kernels"]
1213
mesh = ["ferritin/mesh"]
1314
plms = ["ferritin/plms"]
@@ -30,21 +31,21 @@ ferritin-plms = { path = "../ferritin-plms" }
3031
ferritin-onnx-models = { path = "../ferritin-onnx-models" }
3132
ferritin-structure-mesh = { path = "../ferritin-structure-mesh" }
3233
hf-hub.workspace = true
33-
rerun = { workspace = true, features = ["native_viewer"] }
34+
# rerun = { workspace = true, features = ["native_viewer"] }
3435

3536
# The metal feature is defined above, and we don't need to redefine it conditionally
3637

3738
[target.'cfg(target_os = "macos")'.dependencies]
3839
candle-metal-kernels.workspace = true
3940

4041
[target.'cfg(target_arch = "wasm32")'.dependencies]
41-
tokenizers = { version = "0.21.1", default-features = false, features = [
42+
tokenizers = { version = "0.21.4", default-features = false, features = [
4243
"unstable_wasm",
4344
] }
4445

4546
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
4647
hf-hub.workspace = true
47-
tokenizers = { version = "0.21.1" } # full features for non-wasm
48+
tokenizers = { version = "0.21.4" } # full features for non-wasm
4849

4950

5051
[dev-dependencies]
@@ -59,18 +60,22 @@ required-features = ["bevy"]
5960
[[example]]
6061
name = "bevy_basic_putty"
6162
path = "examples/bevy/basic_putty.rs"
63+
required-features = ["bevy"]
6264

6365
[[example]]
6466
name = "bevy_basic_snapshot"
6567
path = "examples/bevy/basic_snapshot.rs"
68+
required-features = ["bevy"]
6669

6770
[[example]]
6871
name = "bevy_basic_spheres"
6972
path = "examples/bevy/basic_spheres.rs"
73+
required-features = ["bevy"]
7074

7175
[[example]]
7276
name = "bevy_screenshot"
7377
path = "examples/bevy/screenshot.rs"
78+
required-features = ["bevy"]
7479

7580
[[example]]
7681
name = "rerun"

crates/ferritin-examples/examples/bevy/basic_ball_and_stick.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ fn main() -> Result<()> {
4949
Ok(())
5050
}
5151

52-
5352
#[derive(Component)]
5453
struct MainCamera;
5554

crates/ferritin-examples/examples/bevy/basic_snapshot.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use bevy::{
44
app::AppExit,
55
prelude::*,
66
render::view::screenshot::{Capturing, Screenshot, save_to_disk},
7-
window::SystemCursorIcon,
8-
winit::cursor::CursorIcon,
97
};
108
use ferritin_structure_mesh::{ColorScheme, RenderOptions, StructurePlugin, StructureSettings};
119
use ferritin_test_data::TestFile;
@@ -43,27 +41,25 @@ fn main() -> Result<()> {
4341
}
4442

4543
fn screenshot_saving(
46-
mut commands: Commands,
44+
_commands: Commands,
4745
screenshot_saving: Query<Entity, With<Capturing>>,
48-
windows: Query<Entity, With<Window>>,
46+
_windows: Query<Entity, With<Window>>,
4947
) {
50-
let Ok(window) = windows.single() else {
51-
return;
52-
};
48+
// TODO: Update cursor icon API for Bevy 0.17
49+
// Cursor icon management has changed in Bevy 0.17
50+
// See: https://bevyengine.org/learn/migration-guides/0.16-0.17/
5351
match screenshot_saving.iter().count() {
5452
0 => {
55-
commands.entity(window).remove::<CursorIcon>();
53+
// commands.entity(window).remove::<SystemCursorIcon>();
5654
}
5755
x if x > 0 => {
58-
commands
59-
.entity(window)
60-
.insert(CursorIcon::from(SystemCursorIcon::Progress));
56+
// commands.entity(window).insert(SystemCursorIcon::Progress);
6157
}
6258
_ => {}
6359
}
6460
}
6561

66-
fn take_screenshot_and_exit(mut commands: Commands, mut exit: EventWriter<AppExit>) {
62+
fn take_screenshot_and_exit(mut commands: Commands, mut exit: MessageWriter<AppExit>) {
6763
// Wait a few frames to make sure everything is properly initialized
6864
static mut FRAME_COUNT: u32 = 0;
6965
unsafe {

crates/ferritin-examples/examples/bevy/screenshot.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use bevy::{
44
prelude::*,
55
render::view::screenshot::{Capturing, Screenshot, save_to_disk},
66
window::SystemCursorIcon,
7-
winit::cursor::CursorIcon,
87
};
98

109
fn main() {
@@ -30,21 +29,19 @@ fn screenshot_on_spacebar(
3029
}
3130

3231
fn screenshot_saving(
33-
mut commands: Commands,
32+
_commands: Commands,
3433
screenshot_saving: Query<Entity, With<Capturing>>,
35-
windows: Query<Entity, With<Window>>,
34+
_windows: Query<Entity, With<Window>>,
3635
) {
37-
let Ok(window) = windows.single() else {
38-
return;
39-
};
36+
// TODO: Update cursor icon API for Bevy 0.17
37+
// Cursor icon management has changed in Bevy 0.17
38+
// See: https://bevyengine.org/learn/migration-guides/0.16-0.17/
4039
match screenshot_saving.iter().count() {
4140
0 => {
42-
commands.entity(window).remove::<CursorIcon>();
41+
// commands.entity(window).remove::<SystemCursorIcon>();
4342
}
4443
x if x > 0 => {
45-
commands
46-
.entity(window)
47-
.insert(CursorIcon::from(SystemCursorIcon::Progress));
44+
// commands.entity(window).insert(SystemCursorIcon::Progress);
4845
}
4946
_ => {}
5047
}

crates/ferritin-onnx-models/src/models/esm2/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl ESM2 {
7474
ort::init()
7575
.with_name("ESM2")
7676
.with_execution_providers([CUDAExecutionProvider::default().build()])
77-
.commit()?;
77+
.commit();
7878
Ok(Session::builder()?
7979
.with_optimization_level(GraphOptimizationLevel::Level1)?
8080
.with_intra_threads(1)?)

crates/ferritin-onnx-models/src/models/ligandmpnn/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl LigandMPNN {
7373
ort::init()
7474
.with_name("LigandMPNN")
7575
.with_execution_providers([CUDAExecutionProvider::default().build()])
76-
.commit()?;
76+
.commit();
7777
Ok(Session::builder()?
7878
.with_optimization_level(GraphOptimizationLevel::Level1)?
7979
.with_intra_threads(1)?)

crates/ferritin-plms/src/esm/layers/blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl UnifiedTransformerBlock {
129129
pub fn load(vb: VarBuilder, config: &ESMCConfig, layer: usize) -> Result<Self> {
130130
let ESMCConfig {
131131
ffn_type,
132-
132+
133133
use_plain_attn,
134134
n_layers_geom,
135135
residue_scaling_factor,

crates/ferritin-plms/src/featurize/utilities.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,7 @@ mod tests {
636636
("OXT", (0, 0, 36, ..), vec![0.0, 0.0, 0.0]),
637637
];
638638
for (atom_name, (b, i, j, k), expected) in allatom_coords {
639-
let actual: Vec<f32> = ac_backbone_tensor
640-
.i((b, i, j, k))?
641-
.to_vec1()?;
639+
let actual: Vec<f32> = ac_backbone_tensor.i((b, i, j, k))?.to_vec1()?;
642640
assert_eq!(actual, expected, "Mismatch for atom {}", atom_name);
643641
}
644642
Ok(())

0 commit comments

Comments
 (0)