CRITICAL CHECKPOINT - DO NOT PUSH TO GITHUB Recovery Status: - Successfully recovered brainy.ts from compiled JavaScript - All core v3.0 API methods functional (add, get, update, delete, relate, find, etc.) - Neural subsystem intact (562KB embedded patterns, NLP working) - Augmentation pipeline operational (20+ augmentations) - HNSW clustering system complete - Triple Intelligence compiled (needs constructor fix) - Test suite validates functionality Changes preserved: - 898 files with changes from last 3 days - 144,475 insertions - All augmentation improvements - All test coverage enhancements - Complete v3.0 feature set This is a LOCAL checkpoint only - contains recovered work after corruption incident. Created backup in .backups/brainy-full-20250910-151314.tar.gz Branch: recovery-checkpoint-20250910-151433 Date: Wed Sep 10 03:18:04 PM PDT 2025
41 lines
No EOL
1.3 KiB
JavaScript
41 lines
No EOL
1.3 KiB
JavaScript
#!/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', { limit: 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() |