Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProGraML package breaks in python 3.11 #213

Open
m-atalla opened this issue Jul 6, 2023 · 1 comment 路 May be fixed by #214
Open

ProGraML package breaks in python 3.11 #213

m-atalla opened this issue Jul 6, 2023 · 1 comment 路 May be fixed by #214
Labels
Bug Something isn't working

Comments

@m-atalla
Copy link

m-atalla commented Jul 6, 2023

馃悰 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

@m-atalla m-atalla added the Bug Something isn't working label Jul 6, 2023
@m-atalla
Copy link
Author

m-atalla commented Jul 6, 2023

Just as a follow up on the bug report, I have been able to reproduce the bug on another machine that has Python 3.8.16 installed. However, I was able to manually downgrade dgl to version 0.6.1 which allowed programl to work on that machine. Therefore, I can safely assume that the problem persists across multiple Python versions right after a pip install and might require manually downgrading DGL to work. That is, if there is a package available for your Python installation (dgl>=0.6.1 or < 0.9).

I think I have narrowed this problem down pretty well, and I will have a pull request ready with a fix shortly.

Best regards,
Mohamed

@m-atalla m-atalla linked a pull request Jul 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant