Skip to content

[WIP] check_model.py: test model on simulation data too#422

Open
RemiLehe wants to merge 5 commits into
BLAST-AI-ML:mainfrom
RemiLehe:test_sim
Open

[WIP] check_model.py: test model on simulation data too#422
RemiLehe wants to merge 5 commits into
BLAST-AI-ML:mainfrom
RemiLehe:test_sim

Conversation

@RemiLehe
Copy link
Copy Markdown
Contributor

@RemiLehe RemiLehe commented Apr 8, 2026

Summary

  • Extended check_model.py to test accuracy on simulation data. After loading the model, simulation points are converted to experimental units using the inferred calibration (via cal_manager.convert_sim_to_exp), then evaluated against the model. Both experimental and simulation datasets must pass the relative RMSE tolerance for the test to succeed.

  • Fixed AttributeError when loading ensemble_NN models. NNEnsemble does not expose input_transformers/output_transformers directly — those live on each inner TorchModel. ModelManager now accesses them via models[0] for the ensemble case.

if model_type not in ("NN", "ensemble_NN", "GP"):
raise ValueError(f"Unsupported model type: {model_type}")
# Populate inferred calibration in physics units for GUI
# (only meaningful inside the dashboard where state.simulation_calibration is set)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now also set state.simulation_calibration in check_model.py, so this check is not meaningful anymore.

RemiLehe and others added 4 commits April 8, 2026 07:26
NNEnsemble does not expose input_transformers/output_transformers directly;
those attributes live on each inner TorchModel. Access them via models[0]
when the model type is ensemble_NN.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant