deepsphere / deepsphere-weather

A spherical CNN for weather forecasting
MIT License
64 stars 8 forks source link

Where is package igl? #3

Closed jiapei100 closed 2 years ago

jiapei100 commented 2 years ago

import igl, where is package igl ? This one? https://github.com/libigl/libigl

mdeff commented 2 years ago

Yes! With its python bindings https://github.com/libigl/libigl-python-bindings. Install with conda install -c conda-forge igl.

jiapei100 commented 2 years ago

Hey, @mdeff

I don't use conda at all. Is there any other way to install libigl python ? Please take a look at my issue here: https://github.com/libigl/libigl-python-bindings/issues/98, or here: https://github.com/fwilliams/numpyeigen/issues/53 .

mdeff commented 2 years ago

Sorry I've only ever installed libigl with conda.

You can however use deepsphere-weather without libigl, which is only used to build a mesh graph from a sampled sphere. The alternative is to build a knn graph. Here's the relevant code: https://github.com/deepsphere/deepsphere-weather/blob/b85757a389b9f77de241b716040d222f12ef1a4f/modules/models.py#L94

~Quick fix: comment the import igl statement and the compute_cotan_laplacian function in modules/models.py and build a knn graph (which should be the default).~ Properly fixed in git main.

mdeff commented 2 years ago

I just made libigl an optional dependency so you won't need it unless you use the mesh graph option.

jiapei100 commented 2 years ago

@mdeff

I was actually testing https://github.com/deepsphere/deepsphere-weather/blob/main/tutorials/spherical_grids.ipynb , which comes with a Mesh Laplacian demo, which requires to import igl .

hmmmm

mdeff commented 2 years ago

I'm afraid there's no way out of using libigl for the mesh demo. ;) It's the best library I found for the task. I hope your installation issue can be fixed! In the meantime, I encourage you to give conda a try. It's a great tool that avoids many installation issues.

Closing this for now, as I don't think there's anything else we can do.