CHECKPOINT: Industry-standard 3-tier testing implemented
✅ MAJOR BREAKTHROUGH - Session 5 Success: - Unit tests: 18/19 passing with mocked AI (<500MB RAM) - Integration tests: Real AI models loading successfully - Core features: Real embeddings, CRUD operations verified - Architecture: All 11 augmentations, worker threads operational 📋 CRITICAL FINDINGS: - Real AI models load and cache correctly - 384D embeddings generate properly - Core CRUD operations work with real transformers - Memory management effective for production ⚠️ RELEASE BLOCKER IDENTIFIED: - Search operations timeout in test environment - Affects: search(), find(), clustering functionality - Root cause: Likely worker communication during HNSW search - Priority: MUST fix before 2.0.0 release 🎯 NEXT SESSION PRIORITIES: 1. Debug and fix search timeout issue 2. Verify search/find/clustering work in production 3. Final documentation cleanup 4. Release preparation Confidence: 90% ready (pending search functionality verification)
This commit is contained in:
parent
f0ee5f44ec
commit
4949b6a629
54 changed files with 4987 additions and 68 deletions
41
test-memory-check.js
Normal file
41
test-memory-check.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Check ONNX memory settings
|
||||
console.log('ONNX Memory Settings:')
|
||||
console.log('=====================')
|
||||
console.log('ORT_DISABLE_MEMORY_ARENA:', process.env.ORT_DISABLE_MEMORY_ARENA)
|
||||
console.log('ORT_DISABLE_MEMORY_PATTERN:', process.env.ORT_DISABLE_MEMORY_PATTERN)
|
||||
console.log('ORT_INTRA_OP_NUM_THREADS:', process.env.ORT_INTRA_OP_NUM_THREADS)
|
||||
console.log('ORT_INTER_OP_NUM_THREADS:', process.env.ORT_INTER_OP_NUM_THREADS)
|
||||
|
||||
// Now test with minimal embedding
|
||||
import { BrainyData } from './dist/index.js'
|
||||
|
||||
async function testMinimalSearch() {
|
||||
try {
|
||||
console.log('\nInitializing Brainy...')
|
||||
const brain = new BrainyData({
|
||||
storage: { forceMemoryStorage: true },
|
||||
verbose: false
|
||||
})
|
||||
await brain.init()
|
||||
|
||||
console.log('Adding one noun...')
|
||||
await brain.addNoun({ name: 'Test' })
|
||||
|
||||
console.log('Memory before search:', (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2), 'MB')
|
||||
|
||||
console.log('Performing minimal search...')
|
||||
const results = await brain.search('test', 1)
|
||||
|
||||
console.log('Memory after search:', (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2), 'MB')
|
||||
console.log(`Found ${results.length} results`)
|
||||
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error('Failed:', error.message)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
testMinimalSearch()
|
||||
Loading…
Add table
Add a link
Reference in a new issue