jennyzhang0215 / STAR-GCN

STAR-GCN: Stacked and Reconstructed Graph Convolutional Networks for Recommender Systems
106 stars 28 forks source link

ImportError: cannot import name 'replace_file' #2

Open leabriand opened 3 years ago

leabriand commented 3 years ago

Hello, I have the following error when trying to run the example given :

Traceback (most recent call last):
  File "../STAR-GCN.py", line 8, in <module>
    from mxgraph.datasets import LoadData
  File "/root/STAR-GCN/mxgraph/datasets.py", line 11, in <module>
    import gluonnlp as nlp
  File "/usr/local/lib/python3.5/dist-packages/gluonnlp/__init__.py", line 25, in <module>
    from . import data
  File "/usr/local/lib/python3.5/dist-packages/gluonnlp/data/__init__.py", line 23, in <module>
    from . import (batchify, candidate_sampler, conll, corpora, dataloader,
  File "/usr/local/lib/python3.5/dist-packages/gluonnlp/data/question_answering.py", line 31, in <module>
    from mxnet.gluon.utils import download, check_sha1, _get_repo_file_url, replace_file
ImportError: cannot import name 'replace_file'

A maybe similar issue was reported here : https://github.com/dmlc/gluon-nlp/issues/1201 : it seems to come from an incompatibility between gluon and mxnet 1.5 ? Should I upgrade mxnet to 1.6 or would it cause issues with STAR-GCN training after ?

Thanks in advance !

leabriand commented 3 years ago

I think I may solve the issue by installing an old version of gluonnlp, in case someone have the same issue, I tried for example with the 0.8.1 version with :

pip install "gluonnlp==0.8.1"