PGL icon indicating copy to clipboard operation
PGL copied to clipboard

Graph4Rec的例子报错了

Open guijuzhejiang opened this issue 3 years ago • 7 comments

  • PGL和PaddlePaddle版本号: PGL :2.2.2, paddlepaddle-gpu:2.2.0
  • 系统环境: python:3.9

复现信息:

跑Graph4Rec的例子 运行:python train.py --config ../../user_configs/metapath2vec.yaml --ip ../../toy_data/ip_list.txt报错如下: Traceback (most recent call last): File "/home/zzg/anaconda3/envs/py39_DL_cu112/lib/python3.9/threading.py", line 950, in _bootstrap_inner self.run() File "/home/zzg/anaconda3/envs/py39_DL_cu112/lib/python3.9/threading.py", line 888, in run self._target(*self._args, **self._kwargs) File "/home/zzg/workspace/pycharm/PGL/apps/Graph4Rec/env_run/src/datasets/helper.py", line 78, in _generatorcall for output in self.generator(): File "/home/zzg/workspace/pycharm/PGL/apps/Graph4Rec/env_run/src/datasets/walk.py", line 79, in base_walk_generator walks = Sampler.metapath_randomwalk_with_walktimes( File "/home/zzg/workspace/pycharm/PGL/apps/Graph4Rec/env_run/src/datasets/sampling.py", line 309, in metapath_randomwalk_with_walktimes neighbors = graph.sample_successor( File "/home/zzg/workspace/pycharm/PGL/pgl/distributed/dist_graph.py", line 295, in sample_successor res = self._client.batch_sample_neighboors( TypeError: batch_sample_neighboors(): incompatible function arguments. The following argument types are supported: 1. (self: paddle.fluid.core_avx.GraphPyClient, arg0: str, arg1: List[int], arg2: int) -> List[List[Tuple[int, float]]]

Invoked with: <paddle.fluid.core_avx.GraphPyClient object at 0x7f11756055b0>, 'u2click2i', array([1589, 1704, 1641, 1630, 1504, 1604, 1718, 1558, 1530, 1628, 1510, 1550, 1509, 1650, 1528, 1656, 1548, 1671, 1729, 1621], dtype=uint64), 10, False, False

guijuzhejiang avatar Jan 17 '22 12:01 guijuzhejiang

目前需要安装paddlepaddle 的develop版本才可以跑。建议先卸载原先的paddlepaddle,然后按照如下命令重新安装: python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html

Liwb5 avatar Jan 17 '22 12:01 Liwb5

谢谢回复,当前环境还有其他paddle产品在用,所以paddle版本不变的前提下,请问怎么修改batch_sample_neighboors方法?感觉要加return_weight, return_edges这两个参数的参数名吧?

guijuzhejiang avatar Jan 18 '22 01:01 guijuzhejiang

可以将pgl的版本回退到2.1.5即可。 命令如下:pip install pgl==2.1.5

Liwb5 avatar Jan 18 '22 02:01 Liwb5

谢谢,尝试安装2.1.5但是找不到以前的版本报错了 $ pip install pgl==2.1.5 ERROR: Could not find a version that satisfies the requirement pgl==2.1.5 (from versions: 2.2.0, 2.2.1, 2.2.2) ERROR: No matching distribution found for pgl==2.1.5

guijuzhejiang avatar Jan 21 '22 02:01 guijuzhejiang

可能需要更新pip。 pip install –upgrade pip

Liwb5 avatar Jan 21 '22 02:01 Liwb5

目前需要安装paddlepaddle 的develop版本才可以跑。建议先卸载原先的paddlepaddle,然后按照如下命令重新安装: python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html

hi! 这个paddlepaddle是cpu版本,目前Graph4Rec支持GPU吗?Thanks!

xiransong avatar Mar 04 '22 13:03 xiransong

目前需要安装paddlepaddle 的develop版本才可以跑。建议先卸载原先的paddlepaddle,然后按照如下命令重新安装: python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html

hi! 这个paddlepaddle是cpu版本,目前Graph4Rec支持GPU吗?Thanks!

可以看官网的GPU Develop安装 https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html

Yelrose avatar Mar 04 '22 13:03 Yelrose