clusterkit 0.2.5 → 0.2.6.pre

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: f1792f0812f8e23905c044fd0bfc7d504ba1fedc3fbb22cc72ad7373ba9a6d47
4
+ data.tar.gz: f6fa0df455d8cf867826e7c0b5794d9519b70a6a488e47fc1ecc633bea47fec4
5
5
  SHA512:
6
- metadata.gz: a0104f2e34d261e5d8da181f783f2c30e1127b8895ff2a1be64e4e7ec824e9fce9da5e08aebb0dd2e08d0ddca4b9e9b7c0d14d40335b9ccf25ffd014ba048812
7
- data.tar.gz: d8c236c53f3e351d210c9de923bb4a77b82b33fe4c1caad4889a2251cfc92addc6980c8c621e7aac6408603d05e1ef529285ccc20d043726d0e7c6473a2fc926
6
+ metadata.gz: b1724f027de49c08b31fef9fb8becc68ea47062a556009636569b952a42068d0dc0d318425c2293fb3c513484db0fdf7f6a6ae54a9d8d2bed732a3613d309b61
7
+ data.tar.gz: 338b4d6a685e9f749876bcf7521a9bfc7d457adc4853d6e27aac33692a3dd2dff69bccc38a5e73b0caf0bc22b5dc6daf796cc74126c7c42dfaa47ed39c760796
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.pre"
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.pre
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