dmlc / dgl

Python package built to ease deep learning on graph, on top of existing DL frameworks.
http://dgl.ai
Apache License 2.0
13.18k stars 2.99k forks source link

[dev] limit numpy < 2.0.0 for compatibility #7479

Closed Rhett-Ying closed 1 week ago

Rhett-Ying commented 1 week ago

Description

let's limit the numpy < 2.0.0 for now. we need to support 2.0.0 in near future.

Checklist

Please feel free to remove inapplicable items for your PR.

Changes

Rhett-Ying commented 1 week ago

This PR is replacing https://github.com/dmlc/dgl/pull/7478

dgl-bot commented 1 week ago

To trigger regression tests:

Rhett-Ying commented 1 week ago

related to https://github.com/dmlc/dgl/issues/7468

dgl-bot commented 1 week ago

Commit ID: 68f3227c770c184b9c0210c03f695d603300cbe4

Build ID: 1

Status: ❌ CI test failed in Stage [Distributed Torch CPU Unit test].

Report path: link

Full logs path: link

Rhett-Ying commented 1 week ago

@dgl-bot

dgl-bot commented 1 week ago

Commit ID: 68f3227c770c184b9c0210c03f695d603300cbe4

Build ID: 2

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

jakirkham commented 1 week ago

Thanks Rhett! 🙏

It's good to be safe 🙂

Though am wondering if this is actually needed ( https://github.com/dmlc/dgl/issues/7468#issuecomment-2196270492 )?

Skeleton003 commented 6 days ago

Thanks Rhett! 🙏

It's good to be safe 🙂

Though am wondering if this is actually needed ( #7468 (comment) )?

Thank you @jakirkham . To support numpy>=2.0.0 we need to set the minimum supported torch version to 2.3.0. Our team will discuss this issue at the Monday meeting.

jakirkham commented 6 days ago

Thanks for following up! 🙏

That's certainly one approach

Am wondering if another might simply be to inform users they need to update PyTorch if they want to use NumPy 2

Thinking this as in many ways this is a problem with old PyTorch packages' metadata in that they don't explicitly disallow being installed with NumPy 2. If they did, then users would not be able to install older PyTorch packages with NumPy 2. It doesn't sound like this is an issue with DGL itself

Rhett-Ying commented 4 days ago

As this issue is not directly caused by DGL, we'd like to revert this PR. And if anyone hit this issue while using torch < 2.3, it's user's responsibility to either downgrade numpy or upgrade torch.

Rhett-Ying commented 4 days ago

Thanks Rhett! 🙏 It's good to be safe 🙂 Though am wondering if this is actually needed ( #7468 (comment) )?

Thank you @jakirkham . To support numpy>=2.0.0 we need to set the minimum supported torch version to 2.3.0. Our team will discuss this issue at the Monday meeting.

No. DGL will not set the minimum of torch to 2.3.0.

jakirkham commented 4 days ago

Thank you both! 🙏