-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of the STEMMUS_SCOPE BMI, +docs +gprc4bmi #89
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@SarahAlidoost this PR is also ready to review. It should be compatible with the STEMMUS_SCOPE executable in the PR there. Do note that you'll have to mark that file as executable ("allow executing file as program"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSchilperoort thanks 👍 I was able to run the bmi with local exe but not with docker. please see my comments. One more point, can you please move all bmi and docker to a directory e.g. "bmi"? Another one, if we can pull the image automatically?
Quality Gate failedFailed conditions 78.2% Coverage on New Code (required ≥ 80%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSchilperoort thanks for the fixes. I was able to run the notebook 🎉 Let's merge this PR 🚀
This is the full implementation of the STEMMUS_SCOPE Basic Model Interface in Python, built upon the Matlab Compiler Runtime (MCR) executable file generated on Snellius.
The communication goes through an open subprocess of STEMMUS_SCOPE running in "interactive" mode (see EcoExtreML/STEMMUS_SCOPE#208). As overhead of MCR starting up is about 5 seconds.
Based on the state that the model wrote to file (the entire workspace), all requires functions including getters and setters can be implemented. With
h5py
the state file can be modified in-place. This makes the Python overhead per time step <0.10 seconds.Todo:
As a follow up to this PR, the variable list can be extended (see EcoExtreML/STEMMUS_SCOPE#209).
Additionally, the model (with the MCR dependencies) can be packaged in a container. This will allow for:
communicating with the container directly from Python (using the BMI of this PR).Done!extending the image of 1. and adding this BMI + grpc4bmi to make the model compatible with systems such as eWaterCycle.Done!Update:
The main way of running the BMI is now through docker. Tests with the docker image communication run on CI, allowing us to test the entire BMI interface.
A local option is still available (if you run Linux), which is also required to be able to make a grpc4bmi container.