SEAL icon indicating copy to clipboard operation
SEAL copied to clipboard

A small question

Open QiAyo523 opened this issue 5 years ago • 16 comments

Hi, Mr.Zhang, Can I speak Chinese? My English is too bad. 非常感谢您的代码,他对我很有用。我下载之后使用Python版本,想跑一下,但是这里一直有问题,util_function里面的form util import GNNGraph,我试图安装第三方包,但是一直没有成功,想问一下util这个文件是您自己实现的吗?如果是的话,可能您没给出来麽?

QiAyo523 avatar Aug 22 '19 09:08 QiAyo523

你好。util 文件来自pytorch_DGCNN,需要在使用SEAL前提前下载安装到跟SEAL相同level的文件夹下。你可以执行“bash ./install.sh” 来自动安装pytorch_DGCNN 以及其他所需要的包。谢谢!

muhanzhang avatar Aug 22 '19 15:08 muhanzhang

好的,非常感谢哦!我也在您的其他项目里面找到这个了,😃 (^m^ )------------------ 原始邮件 ------------------ 发件人: "Muhan Zhang"[email protected] 发送时间: 2019年8月22日(星期四) 晚上11:34 收件人: "muhanzhang/SEAL"[email protected]; 抄送: "QiAyo523"[email protected];"Author"[email protected]; 主题: Re: [muhanzhang/SEAL] A small question (#20)

你好。util 文件来自pytorch_DGCNN,需要在使用SEAL前提前下载安装到跟SEAL相同level的文件夹下。你可以执行“bash ./install.sh” 来自动安装pytorch_DGCNN 以及其他所需要的包。谢谢!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

QiAyo523 avatar Aug 22 '19 15:08 QiAyo523

你好,我在mac上运行Main.py时,有io异常,具体是OSError: dlopen(/Users/lijuan/PythonCode/pytorch_DGCNN/lib/build/dll/libgnn.so, 6): no suitable image found. Did find:,我尝试了网上的解决方案,都不能解决,请问你是否遇到过这样的问题呢?

QiAyo523 avatar Aug 25 '19 14:08 QiAyo523

Hi, please check out this issue: https://github.com/muhanzhang/SEAL/issues/17

muhanzhang avatar Aug 25 '19 18:08 muhanzhang

Thank you very much!------------------ 原始邮件 ------------------ 发件人: "Muhan Zhang"[email protected] 发送时间: 2019年8月26日(星期一) 凌晨2:48 收件人: "muhanzhang/SEAL"[email protected]; 抄送: "QiAyo523"[email protected];"Author"[email protected]; 主题: Re: [muhanzhang/SEAL] A small question (#20)

Hi, please check out this issue: #17

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

QiAyo523 avatar Aug 26 '19 00:08 QiAyo523

Sorry,I get a new error when I run this code, and I think the written is correct,but I can't find the reason. Maybe the data is not load? Traceback (most recent call last): File "Main.py", line 103, in train_graphs, test_graphs, max_n_label = links2subgraphs(A, train_pos, train_neg, test_pos, test_neg, args.hop, args.max_nodes_per_hop, node_information) File "/home/wangwang/SEAL-master/Python/util_functions.py", line 106, in links2subgraphs train_graphs = helper(A, train_pos, 1) + helper(A, train_neg, 0) File "/home/wangwang/SEAL-master/Python/util_functions.py", line 99, in helper g_list = [GNNGraph(g, g_label, n_labels, n_features) for g, n_labels, n_features in results] File "/home/wangwang/SEAL-master/Python/../../pytorch_DGCNN/util.py", line 53, in init self.degs = list(dict(g.degree).values()) TypeError: 'instancemethod' object is not iterable

QiAyo523 avatar Aug 28 '19 04:08 QiAyo523

Which networkx version did you use? Sometimes try to replace "g.degree" with "g.degree()" solves this issue.

muhanzhang avatar Aug 28 '19 04:08 muhanzhang

That's OK! Thanks!
The networkx version on the server is too low. ==||

QiAyo523 avatar Aug 28 '19 04:08 QiAyo523

Hello, dose your model output the probability of a link between the nodepairs?

QiAyo523 avatar Aug 29 '19 12:08 QiAyo523

Hi, please check out this issue: https://github.com/muhanzhang/SEAL/issues/10

And please try to first look for your question in existing issues. Many of them have been answered before. Thanks!

muhanzhang avatar Aug 29 '19 16:08 muhanzhang

Oh, I see, thank you, and I'm sorry to have caused so much trouble to you. 😂------------------ 原始邮件 ------------------ 发件人: "Muhan Zhang"[email protected] 发送时间: 2019年8月30日(星期五) 凌晨0:20 收件人: "muhanzhang/SEAL"[email protected]; 抄送: "QiAyo523"[email protected];"Author"[email protected]; 主题: Re: [muhanzhang/SEAL] A small question (#20)

Hi, please check out this issue: #10

And please try to first look for your question in existing issues. Many of them have been answered before. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

QiAyo523 avatar Aug 29 '19 17:08 QiAyo523

您好,我在服务器上跑的时候也遇到了相同的问题。然后进行了下面的步骤(bash ./install.sh) (base) czw@sy-NF5280M5:~/seal/SEAL/Python$ bash ./install.sh 结果出现了 ./install.sh: line 2: $'\r': command not found ./install.sh: line 3: cd: $'../../\r': No such file or directory fatal: destination path 'pytorch_DGCNN' already exists and is not an empty directory. ./install.sh: line 5: cd: $'pytorch_DGCNN\r': No such file or directory ./install.sh: line 6: cd: $'lib\r': No such file or directory make: the '-j' option requires a positive integer argument Usage: make [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. --eval=STRING Evaluate STRING as a makefile statement. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from recipes. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any recipe; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -O[TYPE], --output-sync[=TYPE] Synchronize output of parallel jobs by TYPE. -p, --print-data-base Print make's internal database. -q, --question Run no recipe; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo recipes. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. --trace Print tracing information. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced.

This program built for x86_64-pc-linux-gnu Report bugs to [email protected] ./install.sh: line 8: cd: $'.\r': No such file or directory Requirement already satisfied: numpy in /home/czw/anaconda3/lib/python3.7/site-packages (1.18.1) Requirement already satisfied: scipy in /home/czw/anaconda3/lib/python3.7/site-packages (1.4.1) Requirement already satisfied: numpy>=1.13.3 in /home/czw/anaconda3/lib/python3.7/site-packages (from scipy) (1.18.1) Requirement already satisfied: networkx in /home/czw/anaconda3/lib/python3.7/site-packages (2.4) Requirement already satisfied: decorator>=4.3.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from networkx) (4.4.1) Requirement already satisfied: tqdm in /home/czw/anaconda3/lib/python3.7/site-packages (4.42.1) Requirement already satisfied: sklearn in /home/czw/.local/lib/python3.7/site-packages (0.0) Requirement already satisfied: scikit-learn in /home/czw/anaconda3/lib/python3.7/site-packages (from sklearn) (0.22.1) Requirement already satisfied: numpy>=1.11.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.18.1) Requirement already satisfied: scipy>=0.17.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.4.1) Requirement already satisfied: joblib>=0.11 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (0.14.1) Requirement already satisfied: gensim in /home/czw/anaconda3/lib/python3.7/site-packages (3.8.3) Requirement already satisfied: smart-open>=1.8.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (2.1.0) Requirement already satisfied: scipy>=0.18.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.4.1) Requirement already satisfied: six>=1.5.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.14.0) Requirement already satisfied: numpy>=1.11.3 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.18.1) Requirement already satisfied: boto in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (2.49.0) Requirement already satisfied: boto3 in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (1.14.23) Requirement already satisfied: requests in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (2.22.0) Requirement already satisfied: botocore<1.18.0,>=1.17.23 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (1.17.23) Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (0.10.0) Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (0.3.3) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (3.0.4) Requirement already satisfied: idna<2.9,>=2.5 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (2.8) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (1.25.8) Requirement already satisfied: certifi>=2017.4.17 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (2019.11.28) Requirement already satisfied: docutils<0.16,>=0.10 in /home/czw/anaconda3/lib/python3.7/site-packages (from botocore<1.18.0,>=1.17.23->boto3->smart-open>=1.8.1->gensim) (0.15.2) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from botocore<1.18.0,>=1.17.23->boto3->smart-open>=1.8.1->gensim) (2.8.1) 然后后面进行(base) czw@sy-NF5280M5:~/seal/SEAL/Python$ python3 Main.py --data-name NS --test-ratio 0.5 --hop 'auto' --use-embedding 出现的还是这样的问题() Traceback (most recent call last): File "Main.py", line 13, in from util_functions import * File "/home/czw/seal/SEAL/Python/util_functions.py", line 17, in from util import GNNGraph ModuleNotFoundError: No module named 'util'

也就是我执行了bash ./install.sh,还是出现一样的问题

xihairanfeng avatar Jul 27 '20 10:07 xihairanfeng

您好,我在服务器上跑的时候也遇到了相同的问题。然后进行了下面的步骤(bash ./install.sh) (base) czw@sy-NF5280M5:~/seal/SEAL/Python$ bash ./install.sh 结果出现了 ./install.sh: line 2: $'\r': command not found ./install.sh: line 3: cd: $'../../\r': No such file or directory fatal: destination path 'pytorch_DGCNN' already exists and is not an empty directory. ./install.sh: line 5: cd: $'pytorch_DGCNN\r': No such file or directory ./install.sh: line 6: cd: $'lib\r': No such file or directory make: the '-j' option requires a positive integer argument Usage: make [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. --eval=STRING Evaluate STRING as a makefile statement. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from recipes. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any recipe; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -O[TYPE], --output-sync[=TYPE] Synchronize output of parallel jobs by TYPE. -p, --print-data-base Print make's internal database. -q, --question Run no recipe; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo recipes. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. --trace Print tracing information. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced.

This program built for x86_64-pc-linux-gnu Report bugs to [email protected] ./install.sh: line 8: cd: $'.\r': No such file or directory Requirement already satisfied: numpy in /home/czw/anaconda3/lib/python3.7/site-packages (1.18.1) Requirement already satisfied: scipy in /home/czw/anaconda3/lib/python3.7/site-packages (1.4.1) Requirement already satisfied: numpy>=1.13.3 in /home/czw/anaconda3/lib/python3.7/site-packages (from scipy) (1.18.1) Requirement already satisfied: networkx in /home/czw/anaconda3/lib/python3.7/site-packages (2.4) Requirement already satisfied: decorator>=4.3.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from networkx) (4.4.1) Requirement already satisfied: tqdm in /home/czw/anaconda3/lib/python3.7/site-packages (4.42.1) Requirement already satisfied: sklearn in /home/czw/.local/lib/python3.7/site-packages (0.0) Requirement already satisfied: scikit-learn in /home/czw/anaconda3/lib/python3.7/site-packages (from sklearn) (0.22.1) Requirement already satisfied: numpy>=1.11.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.18.1) Requirement already satisfied: scipy>=0.17.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.4.1) Requirement already satisfied: joblib>=0.11 in /home/czw/anaconda3/lib/python3.7/site-packages (from scikit-learn->sklearn) (0.14.1) Requirement already satisfied: gensim in /home/czw/anaconda3/lib/python3.7/site-packages (3.8.3) Requirement already satisfied: smart-open>=1.8.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (2.1.0) Requirement already satisfied: scipy>=0.18.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.4.1) Requirement already satisfied: six>=1.5.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.14.0) Requirement already satisfied: numpy>=1.11.3 in /home/czw/anaconda3/lib/python3.7/site-packages (from gensim) (1.18.1) Requirement already satisfied: boto in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (2.49.0) Requirement already satisfied: boto3 in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (1.14.23) Requirement already satisfied: requests in /home/czw/anaconda3/lib/python3.7/site-packages (from smart-open>=1.8.1->gensim) (2.22.0) Requirement already satisfied: botocore<1.18.0,>=1.17.23 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (1.17.23) Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (0.10.0) Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /home/czw/anaconda3/lib/python3.7/site-packages (from boto3->smart-open>=1.8.1->gensim) (0.3.3) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (3.0.4) Requirement already satisfied: idna<2.9,>=2.5 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (2.8) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (1.25.8) Requirement already satisfied: certifi>=2017.4.17 in /home/czw/anaconda3/lib/python3.7/site-packages (from requests->smart-open>=1.8.1->gensim) (2019.11.28) Requirement already satisfied: docutils<0.16,>=0.10 in /home/czw/anaconda3/lib/python3.7/site-packages (from botocore<1.18.0,>=1.17.23->boto3->smart-open>=1.8.1->gensim) (0.15.2) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/czw/anaconda3/lib/python3.7/site-packages (from botocore<1.18.0,>=1.17.23->boto3->smart-open>=1.8.1->gensim) (2.8.1) 然后后面进行(base) czw@sy-NF5280M5:~/seal/SEAL/Python$ python3 Main.py --data-name NS --test-ratio 0.5 --hop 'auto' --use-embedding 出现的还是这样的问题() Traceback (most recent call last): File "Main.py", line 13, in from util_functions import * File "/home/czw/seal/SEAL/Python/util_functions.py", line 17, in from util import GNNGraph ModuleNotFoundError: No module named 'util'

也就是我执行了bash ./install.sh,还是出现一样的问题

我在当前目录执行了install.sh里面的每一步,通过了这个问题(当然cd 到这个是不通过的 dirname $0,自己切换到当前脚本的目录执行的后面的 )

xihairanfeng avatar Jul 27 '20 13:07 xihairanfeng

'\r': command not found

Hi,你是不是有在windows和linux之间拷贝过?可以参考这个https://blog.csdn.net/u010416101/article/details/80135293

muhanzhang avatar Jul 27 '20 19:07 muhanzhang

Hello Dr.Zhang. I'm also trying to run the command to install all the packages I need, but I got some errors:

(untitled) C:\Users\84536\PycharmProjects\SEAL\Python>bash ./install.sh Cloning into 'pytorch_DGCNN'... remote: Enumerating objects: 453, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (5/5), done. remote: Total 453 (delta 0), reused 2 (delta 0), pack-reused 448 Receiving objects: 100% (453/453), 49.61 MiB | 3.14 MiB/s, done. Resolving deltas: 100% (96/96), done. Updating files: 100% (277/277), done. ./install.sh: line 7: make: command not found ./install.sh: line 9: pip: command not found ./install.sh: line 10: pip: command not found ./install.sh: line 11: pip: command not found ./install.sh: line 12: pip: command not found ./install.sh: line 13: pip: command not found ./install.sh: line 14: pip: command not found

I'm running this project on Windows, it seems like the pytorch_DGCNN folder IS at the same level as the root SEAL folder, but I think there still something else is missing since there are a bunch of "commands not found", and when I try to install util package it always fails. It gives this error: PackagesNotFoundError: The following packages are not available from current channels: Command output: Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • util

Current channels:

  • https://repo.anaconda.com/pkgs/main/win-64
  • https://repo.anaconda.com/pkgs/main/noarch
  • https://repo.anaconda.com/pkgs/r/win-64
  • https://repo.anaconda.com/pkgs/r/noarch
  • https://repo.anaconda.com/pkgs/msys2/win-64
  • https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

Any help would be much appreciated!

zackzhou0814 avatar Mar 07 '22 18:03 zackzhou0814

Hi, the "install.sh" only runs on linux-based systems. If you run it on windows, you need to manually install the packages. However, I would recommend to directly use the latest SEAL_OGB repository, which uses modern GNN library (pytorch geometric) and supports faster inference speed and large-scale datasets.

muhanzhang avatar Mar 08 '22 03:03 muhanzhang