ccao-data / api-res-avm

REST API for getting predicted values from the CCAO's residential model
0 stars 0 forks source link

Auto-strip non-predictor parameters from pre-2024 models #5

Open jeancochrane opened 6 months ago

jeancochrane commented 6 months ago

Models prior to 2024 require all parameter values to be present in the request body, even though non-predictor parameters are stripped out by the recipe prior to prediction. This means that the caller needs to provide 2x the parameters for no good reason. We can get around this by adjusting the backend logic to auto-populate missing non-predictor parameters with null values for these models, to make it appear to the caller like the model endpoint only requires predictors even though under the hood we'll be passing through the required non-predictor values.