You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we are relying on YAML files for default config files, which is working fine, but at this point, we do not have proper type checking in place for the parameters supplied by the users.
I was thinking that we can have better checks by simply defining pydantic models with defaults for parameters and configs. This way, we can easily have type checks for user-supplied parameters with minimal effort.
Another option would be to update the yaml files to specify expected datatype for each key value pair
The text was updated successfully, but these errors were encountered:
naik-aakash
changed the title
Switch to pydantic models for MLIP hyperparameters and Config files
Switch to pydantic models for MLIP hyperparameters and Config files ?
Jan 8, 2025
I think this is a great idea. In XPOT, we use json files for the user input, but only due to the different user journey. Failures relating to types occur within the setup of the first fitting, which results in 1) low cost for type errors, and 2) we allow the fitting method to error directly. In the case of autoplex, pydantic would be a great option for type checking.
Pydantic models would seem to me the better option than yaml files with expected datatypes, due to the greater flexibility for types, but I don't think that is strictly necessary here (perhaps when expanding further to other user inputs beyond currently implemented / used (hyper)parameters (e.g. urls). Tools exist for yaml conversion already, so implementation is definitely possible.
Currently, we are relying on YAML files for default config files, which is working fine, but at this point, we do not have proper type checking in place for the parameters supplied by the users.
I was thinking that we can have better checks by simply defining pydantic models with defaults for parameters and configs. This way, we can easily have type checks for user-supplied parameters with minimal effort.
Another option would be to update the yaml files to specify expected datatype for each key value pair
The text was updated successfully, but these errors were encountered: