-
Notifications
You must be signed in to change notification settings - Fork 95
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
Invalid configuration showing for un-activated modes due to schema defaults #626
Comments
Hmm. I tend to think that it's going to be impossible to decide on-the-fly what config options from the schema to extract for a given model build/solve. We could scan the math for references but in the case of different run modes, we might only reference those configuration options in the Python implementation ( Further complicating things is that we can load a model and build it in one mode, solve it, then re-build it and solve it in another mode (e.g. if we want to use Maybe you're right though that we could have |
@brynpickering wouldn't it be possible if the With some added logic (a "compatible_base_math" value?) we could even mix and match our own math and avoid conflicts without adding a lot of logic on our end (i.e., telling our matcher that operate mode and storage_inter_cluster are incompatible). As for the config: that's why I think the added logic to |
Yes, I suppose in theory it would be possible. Although we're talking here about the One option would be to filter the config at build/solve stages using parameters defined in the schema. E.g. a |
You are right on that! Sorry, the But yeah, the general idea is to maybe have some step were we combine stuff into a schema ( This would come with some added maintainability benefits, too. If someone comes up with new functionality that requires another mode and is incompatible with other modes (or at least where compatibility is unknown), we would be able to define it. |
What happened?
This issue came up during debugging for #625.
Our current approach to the model schema introduces potential confusions for users, since schema defaults for modes that are not even present in the "activated" math show up.
In this case, I am debugging the example urban model in "operate" mode. A bunch of parameters related to SPORES show up!
This is caused by our current approach to schemas: we use a single model schema file, instead of extending it. I have the following suggestions:
MODEL_SCHEMA
into the model object.config.init.add_schema
) to allow us, or users, to extend the schema in combination with the math.Which operating systems have you used?
Version
v0.7
Relevant log output
No response
The text was updated successfully, but these errors were encountered: