-
Notifications
You must be signed in to change notification settings - Fork 7
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
Determination of scale_range
in minimisation.py fails for certain inputs
#286
Comments
OK, the actual problem arises when something else than a scalar (for example a numpy array) is passed as I guess nobody would do that on purpose, but somehow this behaviour is triggered in our "LLH workshop" notebook, that requires very much a revision. I guess this is now less urgent as a "bug", but a adding sanity check on the input will be beneficial. P.S.: also, the construction of |
I'm not sure how useful this is as a comment, but if I was starting flarestack from scratch, I would definitely replace the mh_dict/rh_dicts with pydantic models (https://docs.pydantic.dev/latest/). That would be a great way to enforce typing, validate the fields carefully to avoid cases like this, and generally ensure that the user is warned before executing code if the config is bad. I also agree that the converting of lists <-> arrays is not good. |
I had the idea of converting the I had heard (but also forgot, in the meantime) about |
Under certain circumstances, flarestack is unable to build the array with scale ranges. For example with
n_steps=2
this happens:I suspect that when
linspace
returns a single element then the thing breaks. It may be argued thatn_steps=2
is not a very useful setting, but the UX here is far from being optimal. I will try to add some sanity checks here.The text was updated successfully, but these errors were encountered: