Skip to content

Avoid DGL dependency#455

Open
jvdoorss wants to merge 5 commits into
RosettaCommons:mainfrom
jvdoorss:no-dgl
Open

Avoid DGL dependency#455
jvdoorss wants to merge 5 commits into
RosettaCommons:mainfrom
jvdoorss:no-dgl

Conversation

@jvdoorss
Copy link
Copy Markdown

The first installation of RFdiffusion turned out to be a bit complicated, the culprit being the DGL and other dependencies of the SE3Transformer package.

While most dependencies of SE3Transformer are in fact redundant to RFdiffusion (they are used only in the packages benchmarking scripts), a graph learning package like DGL is essential. However, DGL seems to work only up to torch==2.4.1 and appears to be no longer maintained.

I've created a minimal adaptation of SE3Transformer, bypassing DGL and slimming it down to the core components only here. Apart from needing a different format of Graph, the functionality is unchanged there.

This PR would allow to use this DGL-less SE3Transformer making the changes:

  • convert DGL graph to the new Graph object
  • adjust the imports to the slightly simplified architecture of the SE3Transformer package
  • adjust installation instructions
  • remove the included env folder

and non-essential changes

  • updates to avoid warnings
  • unsqueeze edge features only in the transformers caller (Str2Str) rather than in the graph creating function, this seems more intuitive.

As a result, the package is pip installable and works with the latest versions of python and torch. Not sure if this is of use to any other users or if there are no other solutions out there to obtain this already, but if so I figured it might be a useful addition to the repo?

Unfortunately, diffusion tests are failing both for main and this branch, in a similar way. Not much to be learned from that. 🤷‍♂️

jos added 5 commits May 20, 2026 10:58
* add dim to torch.cross
* use r-string in regular expression
* add explicit dim to all torch.cross
* allow optimized matmul computation
@VKudlay
Copy link
Copy Markdown

VKudlay commented May 20, 2026

Hey @jvdoorss. Happened to be looking into a DGL dependency yesterday and saw your note. If that package proved to be challenging, the approach adopted by PhysicsNeMo may be of interest (switching to pygeometric). Not my area of focus right now, but just dropping the ref in case it's useful.

@jvdoorss
Copy link
Copy Markdown
Author

Thanks @VKudlay, great reference 👍

It contains many of the tricks I had to figure out in SE3Transformer. Looks like DGL is being phased out in PhysicsNemo as well... 🤔

@VKudlay
Copy link
Copy Markdown

VKudlay commented May 20, 2026

I wonder why (though it looks like you already figured it out). Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants