YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
feat(redact): land v45 phase 3 HF SHAs + verified end-to-end download
Louis Beaumontfcb0b2dd654f
diff --git a/crates/screenpipe-redact/examples/v45_phase3_smoke.rs b/crates/screenpipe-redact/examples/v45_phase3_smoke.rsindex 6439d6b45..e87ad721d 100644--- a/crates/screenpipe-redact/examples/v45_phase3_smoke.rs+++ b/crates/screenpipe-redact/examples/v45_phase3_smoke.rs@@ -19,8 +19,9 @@ use screenpipe_redact::Redactor;async fn main() -> Result<(), Box<dyn std::error::Error>> {let cfg = OnnxConfig::default();println!("loading model from {}", cfg.model_dir.display());+ println!("(will download from HuggingFace on first run)");- let redactor = OnnxRedactor::load(cfg)?;+ let redactor = OnnxRedactor::load_or_download(cfg).await?;println!("model loaded.\n");let inputs = [diff --git a/crates/screenpipe-redact/src/adapters/onnx.rs b/crates/screenpipe-redact/src/adapters/onnx.rsindex b4dd4d717..a2f01babf 100644--- a/crates/screenpipe-redact/src/adapters/onnx.rs+++ b/crates/screenpipe-redact/src/adapters/onnx.rs@@ -112,16 +112,25 @@ impl OnnxConfig {"https://huggingface.co/screenpipe/pii-redactor/resolve/main/v45_phase3_onnx";/// Files to download from the HF repo on first run. Each is- /// (filename, expected sha256). The SHA values are placeholders- /// — bump after first upload via:+ /// (filename, expected sha256). Recompute via/// shasum -a 256 model_quantized.onnx tokenizer.json config.json+ /// when bumping the model (and bump [`ONNX_REDACTOR_VERSION`]).pub const FILES: &'static [(&'static str, &'static str)] = &[// INT8-quantized model. ~278 MB.- ("model_quantized.onnx", "REPLACE_AFTER_HF_UPLOAD_QUANTIZED"),+ (+ "model_quantized.onnx",+ "77bb202c542bcd3f835992cde3cafb3df868a8a6fc14ca9d1b028452be6b5787",+ ),// SentencePiece tokenizer (HF fast format). ~17 MB.- ("tokenizer.json", "REPLACE_AFTER_HF_UPLOAD_TOKENIZER"),+ (+ "tokenizer.json",+ "14c7e8bf7d9b58ca061fcda93bc8d0eedd1a51ffc3af01a1ba1ef54e2154887e",+ ),// id2label + model config. ~2 KB.- ("config.json", "REPLACE_AFTER_HF_UPLOAD_CONFIG"),+ (+ "config.json",+ "e9a8a3dda702b9efa2b9b5960567a560bf410e92e619184081dd3c9e9990b35d",+ ),];/// Download the model + tokenizer + config from HuggingFace into