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

The CropStructNT_type_sig leads to the failures of numba compilation #163

Open
NickAlexander18 opened this issue Jun 26, 2024 · 1 comment

Comments

@NickAlexander18
Copy link

Hello! I need to install AquaCrop in a new Anaconda environment. But the compilation raise several exceptions which all relatived to the CropStructNT_type_sig in entities.crop.py.

How can I prove it?

The exception is: KeyError: "Failed in nopython mode pipeline (step: native lowering)\n<class 'type'>"

I check the raceback:
image
image
image
image

Compared to the successful compilation (such as HIadj_pre_anthesis.py and check_groundwater_table.py), all of these .py that failed have a common point that numba needs to compile the CropStructNT_type_sig in entities.crop.py.
image

When I checked the CropStructNT_type_sig, I found that the crop_spec had an update comparing to the older version 2.2.3.
image

The variable SwitchGDDType is string, while numba can't recognize the string type. See:
https://stackoverflow.com/questions/56463147/how-to-specify-the-string-data-type-when-using-numba

Therefore, I recommand to change the type of the variable SwitchGDDType to int and give instructions of this variable.

@tfoster88
Copy link
Contributor

Thanks @NickAlexander18 for flagging this and apologies for slow response. Will look into implementing this over the next couple of weeks as we make some broader updates to the code in response to other recent issues raised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants