DassHydro / smash

An open source, Python library interfacing the Fortran Spatially distributed Modelling and ASsimilation for Hydrology platform.
https://smash.recover.inrae.fr/
GNU General Public License v3.0
12 stars 6 forks source link

FIX: parameter order in bounds defined in scaling layer of net #169

Closed nghi-truyen closed 4 months ago

nghi-truyen commented 4 months ago

This PR would fix the issue arising in the scaling layer of net when the keys of bounds are not in the same order as parameters when the bounds argument is specified within the optimize_options. This discrepancy occurs because the standardize function for net does not appropriately adjust the order of bounds according to the order of parameters.

nghi-truyen commented 4 months ago

Should not be simpler to sort the bounds after standardizing it ? You just move the line that you wrote in _standardize_simulation_optimize_options_net to _standardize_simulation_optimize_options_bounds, just before returning bounds = {key: bounds[key] for key in parameters} Then, no need to change anything in _standardize_simulation_optimize_options_net

J'avais hésité entre les deux solutions, mais oui, il me semble que changer _standardize_simulation_optimize_options_bounds est plus logique !