[WIP] check_model.py: test model on simulation data too#422
Open
RemiLehe wants to merge 5 commits into
Open
Conversation
RemiLehe
commented
Apr 8, 2026
| 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) |
Contributor
Author
There was a problem hiding this comment.
We now also set state.simulation_calibration in check_model.py, so this check is not meaningful anymore.
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>
This reverts commit 9d9df82.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extended
check_model.pyto test accuracy on simulation data. After loading the model, simulation points are converted to experimental units using the inferred calibration (viacal_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
AttributeErrorwhen loadingensemble_NNmodels.NNEnsembledoes not exposeinput_transformers/output_transformersdirectly — those live on each innerTorchModel.ModelManagernow accesses them viamodels[0]for the ensemble case.