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

Ensure that environment.yml works with future updates #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adehecq
Copy link
Owner

@adehecq adehecq commented Jun 14, 2023

Make sure that the environment.yml allows running the code as it was used for the RAGMAC intercomparison (last change in June 2022):

  • Hard-code geoutils and xdem version, which have changed a lot
  • hard-code rasterio version as it was causing an error
  • hard-code numba version as it was raising a warning
  • hard-code python, numpy, scipy, pandas and toml versions for safety.

Hopefully this will not be too restrictive for any type of architecture...

TODO:

  • add a test to ensure that some outputs are well reproduced with the set environment.

@adehecq
Copy link
Owner Author

adehecq commented Jun 14, 2023

With specified environment, the code does not run. For example python scripts/main_experiment1.py -c AT_Hintereisferner yields:

  • a deprecation warning: "NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details."
  • the initial statistics seems to fail with an empty table in data/processed/experiment_1/AT_Hintereisferner/init_stats.csv, so no valid DEMs are found. The issue is not obvious because it occurs during the multiprocessing, but is related to a call to rasterio: "*** ValueError: 'bilinear' is not a valid rasterio.warp.Resampling method. Valid methods: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14']"

@adehecq
Copy link
Owner Author

adehecq commented Jun 14, 2023

Teh above issues are solved by freezing the rasterio and numba versions. I also freezed the python, numpy, scipy, pandas and toml versions but trying to not be too restrictive.

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

Successfully merging this pull request may close these issues.

1 participant