ruvnet/ruflo · error · Error
Learning module not initialized
Error message
Learning module not initialized
What it means
Guard in train: the lazily loaded LearningModule (_module) must exist before training on trajectories; the error fires when train is called before successful initialization or after destroy() nulled the module.
Source
Thrown at v3/plugins/ruvector-upstream/src/bridges/learning.ts:110
async destroy(): Promise<void> {
this._module = null;
this._status = 'unloaded';
}
isReady(): boolean {
return this._status === 'ready';
}
getModule(): LearningModule | null {
return this._module;
}
/**
* Train on trajectories
*/
train(trajectories: Trajectory[], config?: Partial<LearningConfig>): number {
if (!this._module) throw new Error('Learning module not initialized');
const mergedConfig = { ...this.config, ...config };
return this._module.train(trajectories, mergedConfig);
}
/**
* Predict action for state
*/
predict(state: Float32Array): { action: number; qValues: Float32Array } {
if (!this._module) throw new Error('Learning module not initialized');
return this._module.predict(state);
}
/**
* Evaluate state value
*/
evaluate(state: Float32Array): number {
if (!this._module) throw new Error('Learning module not initialized');
return this._module.evaluate(state);View on GitHub (pinned to fa13ee4ad6)
Solutions
- Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.
- Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/plugins/ruvector-upstream/src/bridges/learning.ts:110 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/c6f1fd033b72d921.
Report an issue: GitHub.