aditya-grover / climate-learn

Source code for ClimateLearn
MIT License
302 stars 49 forks source link

Possible bug in visualizing samples #71

Closed rutujagurav closed 1 year ago

rutujagurav commented 1 year ago

Describe the bug climate_learn.utils.visualize() prints the image upside down and with flipped colormap.

To Reproduce I am merely running the demo notebook found here - https://colab.research.google.com/drive/1WiNEK1BHsiGzo_bT9Fcm8lea2H_ghNfa

Expected behavior I believe the map plots produced by visualize() should have the same orientation and colormap as the stock images provided in the above notebook i.e. northern hemisphere on top and in the red-blue colormap red should correspond to higher values and blue to lower.

Screenshots image

Environment N/A Additional context N/A

jasonjewik commented 1 year ago

Hi @rutujagurav, thanks for bringing this to our attention. Can you check if #72 produces the behavior you expect? If you are using the tutorial notebook on Google Colab, you can install the library from this specific branch as:

pip install git+https://github.com/aditya-grover/climate-learn.git@issue-71
rutujagurav commented 1 year ago

Thanks @jasonjewik Will do.

rutujagurav commented 1 year ago

For future reference, looks like this change was merged into the main branch and issue-71 branch was deleted. You'll get the following error if you run the above command in the notebook.

WARNING: Did not find branch or tag 'issue-71', assuming revision or ref.
  Running command git checkout -q issue-71
  error: pathspec 'issue-71' did not match any file(s) known to git
ERROR: Command errored out with exit status 1: git checkout -q issue-71

Simply reinstall the main branch and it should produce the correct plots as shown below - image