Repair variance-state reconstruction across River Bayesian streaming inference and produce an offline uncertainty audit.
harbor run -t mimo-v2.6-rl/candidate-2760-ml-inferenceharbor download mimo-v2.6-rl/candidate-2760-ml-inferenceYou are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
The frozen River source tree under /app/vendor/river has a coordinated inference regression.
Numerically plausible values flow through the Bayesian regressor, Gaussian distribution,
running variance, empirical covariance, and tree uncertainty helpers, but the state constructor
contract mixes variance and standard deviation. This makes learned predictive uncertainty too
small while leaving point predictions apparently reasonable.
Repair the existing production code. Do not replace the library, bypass its classes, disable tests, or solve the task only in the audit script.
Var._from_state and Gaussian._from_state must accept the reconstructed variance as the
third state value, exposed by the keyword name var. Var.get() must return that variance,
and Gaussian.sigma must take its square root exactly once.BayesianLinearRegression.predict_one(x, with_dist=True) must pass its predictive variance
into the Gaussian state constructor without taking a premature square root. Its distribution
mean must remain equal to predict_one(x), including after online updates.predict_many must agree with the corresponding predict_one calls;
the repair must not alter point-inference behavior.The expected production modules are:
/app/vendor/river/river/linear_model/bayesian_lin_reg.py/app/vendor/river/river/proba/gaussian.py/app/vendor/river/river/stats/var.py/app/vendor/river/river/covariance/emp.py/app/vendor/river/river/tree/utils.pyAfter repairing the source, run:
python3 /app/workflow/run_uncertainty_audit.py --output /app/output.json
/app/output.json must be valid JSON with top-level
output_schema_version = "river-uncertainty-audit.v1". It must contain the audit's dataset and
training metadata, four prediction cases, three batch point predictions, and the six
state_contract values produced by the repaired real code. All numeric values must be finite.
The task is fully offline. Do not install packages or access the network.