specmem-hardwicksoftware 3.5.28 → 3.5.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of specmem-hardwicksoftware might be problematic. Click here for more details.
package/package.json
CHANGED
|
@@ -599,15 +599,30 @@ async function main() {
|
|
|
599
599
|
// Download base model
|
|
600
600
|
await downloadBaseModel();
|
|
601
601
|
|
|
602
|
-
// Optimize it
|
|
603
|
-
|
|
602
|
+
// Optimize it (non-fatal if fails)
|
|
603
|
+
try {
|
|
604
|
+
await optimizeModel();
|
|
605
|
+
} catch (optErr) {
|
|
606
|
+
console.log(`\n${YELLOW}⚠ Optimization skipped - using base PyTorch model${RESET}`);
|
|
607
|
+
console.log(`${DIM}This is fine! Base model still works great.${RESET}\n`);
|
|
608
|
+
}
|
|
604
609
|
|
|
605
610
|
// Show summary
|
|
606
611
|
showSummary();
|
|
607
612
|
|
|
613
|
+
// Create marker file so init knows setup completed
|
|
614
|
+
const markerPath = path.join(SPECMEM_DIR, '.setup-complete');
|
|
615
|
+
fs.writeFileSync(markerPath, JSON.stringify({
|
|
616
|
+
timestamp: new Date().toISOString(),
|
|
617
|
+
model: MODEL_NAME,
|
|
618
|
+
optimized: fs.existsSync(path.join(OPTIMIZED_DIR, 'quantized_model'))
|
|
619
|
+
}));
|
|
620
|
+
|
|
621
|
+
console.log(`${GREEN}${BOLD}✓ Setup complete! Run 'specmem init' in your project.${RESET}\n`);
|
|
622
|
+
|
|
608
623
|
} catch (e) {
|
|
609
624
|
console.log(`\n${RED}${BOLD}Setup failed: ${e.message}${RESET}`);
|
|
610
|
-
console.log(`${DIM}Try
|
|
625
|
+
console.log(`${DIM}Try: pip3 install torch sentence-transformers${RESET}`);
|
|
611
626
|
process.exit(1);
|
|
612
627
|
}
|
|
613
628
|
}
|