clusterkit 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19c31f1a55e35724884b0005bd5e168c572c75b4cb3331a9634f7b00e5722f25
4
- data.tar.gz: a7620b934689b61e4a88b555885f20eadc92f316cc8f09910fce59fc68ca7445
3
+ metadata.gz: 82e58cc0e1f7e5b5d918b67b015ca766f43c7977bce8675cccc55db718d6b9f0
4
+ data.tar.gz: 5461afea288ab1801b77f04dc0b360c2c6a70665d533ce81d433207f8aadd2e3
5
5
  SHA512:
6
- metadata.gz: a0104f2e34d261e5d8da181f783f2c30e1127b8895ff2a1be64e4e7ec824e9fce9da5e08aebb0dd2e08d0ddca4b9e9b7c0d14d40335b9ccf25ffd014ba048812
7
- data.tar.gz: d8c236c53f3e351d210c9de923bb4a77b82b33fe4c1caad4889a2251cfc92addc6980c8c621e7aac6408603d05e1ef529285ccc20d043726d0e7c6473a2fc926
6
+ metadata.gz: 934c99e049dc701134d666d172fbbd9fa7807c4be1f84bb2116167633e3f0f12f1a409f05ea5d847c3e06fe6d6a0c7281c5a91852454d4be599001c4f09284a7
7
+ data.tar.gz: 3cc3420b3a73b5e4df364f9a67fe39b1f4ee20545ca3a86776d5be9a47d19fcdcc43e4ed32cf9216c727723bd9f8a23c54719df25f01ea38cfcb5cf0b354406c
data/Cargo.lock CHANGED
@@ -88,7 +88,7 @@ dependencies = [
88
88
  [[package]]
89
89
  name = "annembed"
90
90
  version = "0.1.5"
91
- source = "git+https://github.com/scientist-labs/annembed?tag=clusterkit-0.1.1#7a5803405087c10c82185f113e3befb953cc9bab"
91
+ source = "git+https://github.com/scientist-labs/annembed?tag=clusterkit-0.2.6#8f8c451367b3a20817cc9dd9803c56aa0c2b9859"
92
92
  dependencies = [
93
93
  "anyhow",
94
94
  "bincode 2.0.1",
@@ -8,7 +8,7 @@ crate-type = ["cdylib"]
8
8
 
9
9
  [dependencies]
10
10
  magnus = { version = "0.8", features = ["embed"] }
11
- annembed = { git = "https://github.com/scientist-labs/annembed", tag = "clusterkit-0.1.1" }
11
+ annembed = { git = "https://github.com/scientist-labs/annembed", tag = "clusterkit-0.2.6" }
12
12
  hnsw_rs = { git = "https://github.com/scientist-labs/hnswlib-rs", tag = "clusterkit-0.1.0" }
13
13
  hdbscan = "0.11"
14
14
  ndarray = "0.16"
@@ -178,9 +178,28 @@ impl RustUMAP {
178
178
  // Create embedder and perform embedding
179
179
  let mut embedder = Embedder::new(&kgraph, embed_params);
180
180
 
181
- let embed_result = embedder.embed()
182
- .map_err(|e| Error::new(ruby.exception_runtime_error(),
183
- format!("Embedding failed: {}", e)))?;
181
+ let embed_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
182
+ embedder.embed()
183
+ }));
184
+
185
+ let embed_result = match embed_result {
186
+ Ok(Ok(result)) => result,
187
+ Ok(Err(e)) => {
188
+ return Err(Error::new(ruby.exception_runtime_error(),
189
+ format!("Embedding failed: {}", e)));
190
+ }
191
+ Err(panic_info) => {
192
+ let msg = if let Some(s) = panic_info.downcast_ref::<String>() {
193
+ s.clone()
194
+ } else if let Some(s) = panic_info.downcast_ref::<&str>() {
195
+ s.to_string()
196
+ } else {
197
+ "unknown panic".to_string()
198
+ };
199
+ return Err(Error::new(ruby.exception_runtime_error(),
200
+ format!("Embedding panicked: {}", msg)));
201
+ }
202
+ };
184
203
 
185
204
  if embed_result == 0 {
186
205
  return Err(Error::new(ruby.exception_runtime_error(), "No points were embedded"));
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClusterKit
4
- VERSION = "0.2.5"
4
+ VERSION = "0.2.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clusterkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Petersen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-24 00:00:00.000000000 Z
11
+ date: 2026-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys