Skip to content

ProGraML package breaks with recent DGL api changes #213

@m-atalla

Description

@m-atalla

🐛 Bug

Hi, I'm following the example shown in the README, but I am getting the following error when I attempt to import programl:

>>> import programl as pg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/m/code/tinkervenv/lib/python3.11/site-packages/programl/__init__.py", line 55, in <module>
    from programl.transform_ops import to_dgl, to_dot, to_json, to_networkx
  File "/home/m/code/tinker/venv/lib/python3.11/site-packages/programl/transform_ops.py", line 25, in <module>
    from dgl.heterograph import DGLHeteroGraph
ImportError: cannot import name 'DGLHeteroGraph' from 'dgl.heterograph' (/home/m/code/tinker/venv/lib/python3.11/site-packages/dgl/heterograph.py)

To Reproduce

Steps to reproduce the behavior:

  1. Create a virtual environment.
  2. Run the following command to install programl:
pip install -U programl
  1. Open a Python shell and attempt to import programl package:
>>> import programl

Expected behavior

The package should be imported without any errors.

Environment

  • ProGraML version: 0.3.2
  • How you installed ProGraML: pip
  • OS: Linux 6.1.37-lts, EndeavourOS
  • Python version: 3.11.3
  • Versions of any other relevant libraries: dgl-1.1.1

Additional context

Using pip freeze | grep dgl to inspect the installed version is dgl==1.1.1 which has breaking changing in the DGLHeteroGraph API. I have also tried to manually downgrading dgl and got the following error:

$ pip install dgl==0.6.1
ERROR: Could not find a version that satisfies the requirement dgl==0.6.1 (from versions: 0.1.0, 0.1.2, 0.1.3, 1.0.0, 1.0.1, 1.0.4, 1.1.0, 1.1.1)
ERROR: No matching distribution found for dgl==0.6.1

which confirms that dgl-0.6.1 doesn't include a distributed package for Python 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions