dmlc / dgl

Python package built to ease deep learning on graph, on top of existing DL frameworks.
http://dgl.ai
Apache License 2.0
13.23k stars 2.99k forks source link

[Examples]GATNE-T example uses gensim package, which in turn uses deprecated and removed API #7396

Open mk-61 opened 2 months ago

mk-61 commented 2 months ago

🐛 Bug

GATNE-T example uses gensim package. That package, in turn, uses scipy.linalg.triu, which was deprecated and removed in latest scipy: https://docs.scipy.org/doc/scipy/release/1.11.0-notes.html#deprecated-features

To Reproduce

Run the example. Get this: Traceback (most recent call last): File "/workspace/examples/GATNE-T/src/main_sparse.py", line 14, in from utils import * File "/opt/dgl/dgl-source/examples/pytorch/GATNE-T/src/utils.py", line 10, in from gensim.models.keyedvectors import Vocab File "/usr/local/lib/python3.10/dist-packages/gensim/init.py", line 11, in from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401 File "/usr/local/lib/python3.10/dist-packages/gensim/corpora/init.py", line 6, in from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes File "/usr/local/lib/python3.10/dist-packages/gensim/corpora/indexedcorpus.py", line 14, in from gensim import interfaces, utils File "/usr/local/lib/python3.10/dist-packages/gensim/interfaces.py", line 19, in from gensim import utils, matutils File "/usr/local/lib/python3.10/dist-packages/gensim/matutils.py", line 20, in from scipy.linalg import get_blas_funcs, triu ImportError: cannot import name 'triu' from 'scipy.linalg' (/usr/local/lib/python3.10/dist-packages/scipy/linalg/init.py)

Expected behavior

No import errors

Environment

It was discovered in Nvidia DGL container, but I see that here gensim is still used.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you

Rhett-Ying commented 1 month ago

we probably will not update the example. please use a specific version to bypass the crash.

github-actions[bot] commented 5 days ago

This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you