QuantConnect / QuantConnect/Lean

Library Upgrade: dgl

Open Beginner friendly
#9,499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

library-request
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 master branch
  • I have confirmed that this is not a duplicate issue by searching

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.