v3.3.0 — Core ML Pipelines, .mlpackage, VectorStore, DataFrame.toSQL & Local Embeddings
🚀 SwiftSci 3.3.0 — Release Notes
SwiftSci v3.3.0 expands Apple Silicon scientific computing and on-device MLOps with composite Core ML pipeline export, modern .mlpackage directory bundles, an in-memory vector database (VectorStore), high-speed tabular database ingestion (DataFrame.toSQL), and offline dense text embeddings.
🌟 Key Deliverables & Highlights
1. 🍏 Composite Core ML Pipeline Serializer (SwiftML)
PipelineClassifier&PipelineRegressor: Implemented native binary Protobuf export for multi-stage models (fields 200/201 in Apple'sModel.protospecification) viaCoreMLExporter.exportBinaryPipelineClassifierandCoreMLExporter.exportBinaryPipelineRegressor.- Enables chaining preprocessors (
StandardScaler,OneHotEncoder) with classifiers (RandomForestClassifier,MLPClassifier,LogisticRegression) into a single Core ML artifact.
2. 📦 Modern .mlpackage Directory Bundle Exporter (SwiftML)
writeMLPackage: Generates standard.mlpackagedirectory bundles containing validManifest.jsonand nestedData/com.apple.CoreML/model.mlmodelpayloads.- Conformed
CoreMLExportablewith a defaultwriteMLPackage(to:author:description:)method for all SwiftML models.
3. 🧠 In-Memory VectorStore Index (SwiftCluster)
- Accelerate-Optimized Vector Database: High-throughput in-memory vector storage (
VectorStore) with SIMD-vectorized distance and similarity metrics:.cosineSimilarity(vDSP_dotprD+vDSP_svesqD).dotProduct.euclideanDistance(vDSP_distancesqD)
- Thread-safe (
@unchecked SendablewithNSLock) with Top-K search, batch insertions (addBatch), and item inspection.
4. 🗄️ Batch Database Ingestion & TLS Security (SwiftDatabase)
DataFrame.toSQL: High-speed tabular bulk insertion into SQLite, PostgreSQL, and MySQL tables with.append,.replace, and.failIfExistsmodes and automatic schema type inference.SSLMode: Configurable TLS/SSL encryption (.disable,.prefer,.require) with query string parsing (?sslmode=require,?ssl=true) for remote PostgreSQL and MySQL instances.
5. 🔤 Local Dense Text Embedding Engine (SwiftNLP)
-
LocalEmbeddingEngine: Fast, pure-Swift dense text embedding generator (128-D/256-D L2-normalized vector embeddings,$|v|_2 = 1.0$ ) operating 100% locally and offline on Apple Silicon, directly interoperable withSwiftCluster.VectorStore.
6. 📚 100% DocC Documentation & Quality Guardrails
- 100.00% Public API Coverage: 1,356 of 1,356 public symbols documented across all 14 modules.
- CI Test Suite: 380+ unit tests passing with zero regressions.
📦 Installation (Swift Package Manager)
dependencies: [
.package(url: "https://github.com/Nodibell/SwiftSci.git", from: "3.3.0")
]