diffai-core 0.5.1

Core library for AI/ML diff analysis - PyTorch, Safetensors, tensor statistics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use serde_json::Value;
use std::path::Path;

/// Parse NumPy file - FOR INTERNAL USE ONLY (diffai-specific)
pub fn parse_numpy_file(path: &Path) -> Result<Value> {
    // Simplified numpy file parsing
    let mut result = serde_json::Map::new();
    result.insert("model_type".to_string(), Value::String("numpy".to_string()));
    result.insert(
        "file_path".to_string(),
        Value::String(path.to_string_lossy().to_string()),
    );

    Ok(Value::Object(result))
}