ruvnet/ruflo · error
[MoE] Failed to save weights: ${err}
Error message
[MoE] Failed to save weights: ${err} What it means
Log warning in saveWeights: serializing or writing the MoE router weights JSON to disk failed; save returns false so callers know the routing state was not persisted while in-memory operation continues.
Source
Thrown at v3/@claude-flow/neural/src/moe-router.ts:706
b1: Array.from(this.b1),
W2: W2_2d,
b2: Array.from(this.b2),
},
stats: {
updateCount: this.updateCount,
routingCounts: Array.from(this.routingCounts),
avgReward: this.avgReward,
},
metadata: {
savedAt: new Date().toISOString(),
expertNames: [...EXPERT_NAMES],
},
};
writeFileSync(weightsPath, JSON.stringify(model, null, 2));
return true;
} catch (err) {
console.warn(`[MoE] Failed to save weights: ${err}`);
return false;
}
}
/**
* Reset weights to random initialization
*/
resetWeights(): void {
this.W1 = xavierInit(INPUT_DIM, HIDDEN_DIM);
this.b1.fill(0);
this.W2 = xavierInit(HIDDEN_DIM, NUM_EXPERTS);
this.b2.fill(0);
this.resetStats();
}
// ============================================================================
// Private Methods
// ============================================================================View on GitHub (pinned to fa13ee4ad6)
Solutions
- Check write permissions and disk space for the MoE weights path; saving is retried on the next update.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at v3/@claude-flow/neural/src/moe-router.ts:706 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/a20cab2ad74b0531.
Report an issue: GitHub.