Skip to content

🐛[BUG]: Handle Earth2Grid dependency better #1344

@ktangsali

Description

@ktangsali

Version

main

On which installation method(s) does this occur?

All

Describe the issue

Earth2grid dynamically pins its torch requirement at build time based on whichever latest torch version is available. When uv builds earth2grid from source, it now picks torch 2.10.0 (the latest), which creates a torch>=2.10,<2.11 requirement dynamically at install time. So while ordinarily the resolver would have the option to fall back to 2.9.x, but earth2grid's dynamic dependencies are locking in torch 2.10.0.

This catalyzes multiple downstream problems, such as the one described in #1341. Specifically, this involved the latest torch 2.10.0 being incompatible with cuml-cu13, unless proper indices are specified. While we can patch this specific issue, it doesn't fix the underlying problem that earth2grid is effectively hard-pinning torch. So, when torch 2.11 or future are released, the same issue might occur.

Earth2grid also is the only PhysicsNeMo dependency that installs from a GitHub repo, rather than from a hosted index. One specific issue with this is that earth2grid is not taken on PyPI, creating a ripe situation for a supply chain dependency attack in PhysicsNeMo examples where earth2grid is listed in requirements.txt with an unspecified source index.

The Earth2grid dependency was also, previous to #1341, not pinned to a specific commit or tag, causing builds to always use the current moving-target GitHub repository state, rather than a stable source. This caused unpredictable uv cache misses and re-syncs, causing sporadic CI failures with the cause out of our control.

Because of this, earth2grid is currently removed by #1341. It can be added back if better alternative is available, such as stable hosted pre-built wheels.

Minimum reproducible example

Relevant log output

Environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    ? - Needs TriageNeed team to review and classifybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions