QuantConnect / QuantConnect/Lean
Library Upgrade: dgl
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
The QuantConnect/LEAN Python environment should provide dgl==2.4.0 instead of dgl==2.1.0.
This would improve compatibility with the current PyTorch stack and remove the need for torchdata compatibility workarounds. DGL 2.4.0 release notes state that GraphBolt no longer depends on the deprecated torchdata package, and the release adds support for a newer PyTorch/CUDA stack.
Actual Behavior
The current environment provides dgl==2.1.0. DGL 2.1.0 has limited PyTorch compatibility; its release notes list supported PyTorch versions as 2.0.0/1, 2.1.0/1/2, and 2.2.0/1.
This creates compatibility issues with newer Torch versions, including Torch 2.8, and DGL 2.1.0 still requires torchdata support for GraphBolt-related imports. This makes DGL harder to use in the current QuantConnect Python environment.
Potential Solution
Upgrade the bundled DGL package:
dgl==2.1.0 -> dgl==2.4.0
This should reduce dependency conflicts around torchdata and provide better alignment with the current PyTorch package environment.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the dependency declaration that currently pins dgl==2.1.0 in the Python environment configuration. Update the bundled version to 2.4.0, then verify that the environment resolves its PyTorch dependencies without requiring the reported torchdata compatibility workaround. Done means the environment provides DGL 2.4.0 successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100