Skip to content
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

Crop Production Regression model could use improved validation of crop names #1723

Open
emilyanndavis opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for new members of the software team

Comments

@emilyanndavis
Copy link
Member

Both Crop Production models (Percentile and Regression) validate each crop name in the user-provided LULC to crop table by checking (in the model-provided data) for the existence of a climate bin raster for that crop. While this is appropriate for the Percentile model, the Regression model supports only a small subset of those crops.

If I run the Regression model with an LULC to crop table containing avocado—which is supported by the Percentile model but not by the Regression model—the run fails on a FileNotFoundError on an attempt to open avocado_regression_yield_table.csv, because that file does not exist.

This error could be avoided by improving the initial validation of crop names. Instead of checking for the associated climate bin raster, the Regression model should check for the relevant regression yield table, since that is truly the limiting factor for this model.

@emilyanndavis emilyanndavis added bug Something isn't working good first issue Good for new members of the software team labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for new members of the software team
Projects
None yet
Development

No branches or pull requests

1 participant