HarryShomer / TAGNet

Implementation of the EMNLP'23 paper "Distance-Based Propagation for Effficient Knowledge Graph Reasoning"
https://arxiv.org/abs/2311.01024
4 stars 1 forks source link

Hello author, could you please give a complete pytorch and torch_geometric and torcher-cluster versions? Because I kept reporting the following errors when repeating win18rr_transductive and tagnet_astar_inductive experiments. Ask the writer to help me sort it out, please. After my search, I found that it is because the torch_geometric version does not correspond to the problem. #2

Open lh5533223 opened 2 days ago

lh5533223 commented 2 days ago

win18rr_transductive Report an error: 10:41:03 Random seed: 1024 10:41:03 Config file: config/transductive/wn18rr.yaml 10:41:03 Delta: 0 10:41:03 {'dataset': {'class': 'WN18RR', 'root': '~/datasets/knowledge_graphs/'}, 'model': {'aggregate_func': 'pna', 'bias': False, 'class': 'TAGNet', 'concat_hidden': False, 'dependent': False, 'hidden_dims': [32, 32, 32, 32, 32, 32], 'input_dim': 32, 'layer_norm': True, 'message_func': 'distmult', 'short_cut': True}, 'optimizer': {'class': 'Adam', 'lr': 0.005, 'weight_decay': 1e-06}, 'output_dir': '~/experiments/', 'task': {'adversarial_temperature': 0.5, 'metric': ['mr', 'mrr', 'hits@1', 'hits@3', 'hits@10'], 'num_negative': 128, 'strict_negative': True}, 'train': {'batch_size': 16, 'decay': 0.9, 'gpus': [0], 'log_interval': 100, 'num_epoch': 20}} Processing... Traceback (most recent call last): File "E:\lh\KGR\TAGNet-master\src\run.py", line 274, in dataset = util.build_dataset(cfg) File "E:\lh\KGR\TAGNet-master\src\util.py", line 173, in build_dataset dataset = datasets.build_wn18rr(cfg) File "E:\lh\KGR\TAGNet-master\src\datasets.py", line 42, in build_wn18rr dataset = WordNet18RR(**cfg.dataset) File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\datasets\word_net.py", line 133, in init super(WordNet18RR, self).init(root, transform, pre_transform) File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\data\in_memory_dataset.py", line 57, in init super().init(root, transform, pre_transform, pre_filter) File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\data\dataset.py", line 88, in init self._process() File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\data\dataset.py", line 171, in _process self.process() File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\datasets\word_net.py", line 167, in process edge_type = [self.edge2id[i] for i in edge_type] File "E:\anaconda\envs\TAGNet\lib\site-packages\torch_geometric\datasets\word_net.py", line 167, in edge_type = [self.edge2id[i] for i in edge_type] KeyError: 'html'

tagnet_astar_inductive Report an error: 10:49:55 Config file: config/inductive/fb15k237_astarnet.yaml 10:49:55 {'dataset': {'class': 'FB15k237Inductive', 'path': '~/datasets/knowledge_graphs/', 'version': 'v1'}, 'engine': {'batch_size': 64, 'gpus': [0]}, 'metric': 'mrr', 'optimizer': {'class': 'Adam', 'lr': 0.005}, 'output_dir': '~/experiments/', 'task': {'adversarial_temperature': 0.5, 'class': 'InductiveKnowledgeGraphCompletion', 'criterion': 'bce', 'full_batch_eval': True, 'model': {'base_layer': {'aggregate_func': 'sum', 'class': 'NBFNetConv', 'dependent': True, 'input_dim': 32, 'layer_norm': True, 'message_func': 'distmult', 'output_dim': 32, 'query_input_dim': 32}, 'class': 'AStarNet', 'delta': 2, 'node_ratio': 0.5, 'num_layer': 6, 'short_cut': True, 'test_node_ratio': 1}, 'num_negative': 32, 'sample_weight': False, 'strict_negative': True}, 'train': {'num_epoch': 20}} Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_train.txt: 100%|█████████████████████████████████████████████████████████████████| 4245/4245 [00:00<00:00, 387423.47it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_valid.txt: 100%|███████████████████████████████████████████████████████████████████| 489/489 [00:00<00:00, 495893.29it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_test.txt: 100%|████████████████████████████████████████████████████████████████████| 492/492 [00:00<00:00, 247255.88it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_train.txt: 100%|█████████████████████████████████████████████████████████████| 1993/1993 [00:00<00:00, 400289.61it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_valid.txt: 100%|███████████████████████████████████████████████████████████████| 206/206 [00:00<00:00, 207648.79it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_test.txt: 100%|████████████████████████████████████████████████████████████████████████████| 205/205 [00:00<?, ?it/s] 10:49:56 FB15k237Inductive(

entity: 1594

relation: 180

triplet: 5226

) 10:49:56 #train: 4245, #valid: 489, #test: 411 E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte warnings.warn(f'Error checking compiler version for {compiler}: {error}') Traceback (most recent call last): File E:\lh\KGR\TAGNet-master\astarnet\script\run.py:76 solver = util.build_solver(cfg, dataset) File E:\lh\KGR\TAGNet-master\astarnet\reasoning\util.py:105 in build_solver task = core.Configurable.load_config_dict(cfg.task) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py:269 in load_config_dict v = _Configurable.load_config_dict(v) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py:269 in load_config_dict v = _Configurable.load_config_dict(v) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py:277 in load_config_dict return cls(new_config) File ~\AppData\Roaming\Python\Python39\site-packages\decorator.py:232 in fun return caller(func, *(extras + args), *kw) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py:296 in wrapper return init(self, args, kwargs) File E:\lh\KGR\TAGNet-master\astarnet\reasoning\layer.py:60 in init functional.generalized_rspmm(adjacency, relation_input, input, sum="add", mul="mul") File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\spmm.py:378 in generalized_rspmm return Function.apply(sparse.coalesce(), relation, input) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\spmm.py:174 in forward forward = spmm.rspmm_add_mul_forward_cpu File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\torch.py:26 in getattr return getattr(self.module, key) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\decorator.py:102 in get result = self.func(obj) File ~\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\torch.py:30 in module return cpp_extension.load(self.name, self.sources, self.extra_cflags, self.extra_cuda_cflags, File E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py:1079 in load return _jit_compile( File E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py:1317 in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py:1699 in _import_module_from_library file, path, description = imp.find_module(module_name, [path]) File E:\anaconda\envs\TAGNet\lib\imp.py:296 in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'spmm'

My version goes like this: image

lh5533223 commented 2 days ago

At present, my debugging code problems are all related to pytorch and torch_geometric compatibility issues, could you please provide me with a detailed version corresponding scheme?

I have no problem repliating the experimental results of fb15k_237_inductive and wn18rr_inductive!

lh5533223 commented 1 day ago

I run a python script/run. Py - c config/inductive/fb15k237_astarnet yaml - version v1 - gpus [0] when the result is the following: 16:02:38 Config file: config/inductive/fb15k237_astarnet.yaml 16:02:38 {'dataset': {'class': 'FB15k237Inductive', 'path': '~/datasets/knowledge_graphs/', 'version': 'v1'}, 'engine': {'batch_size': 64, 'gpus': [0]}, 'metric': 'mrr', 'optimizer': {'class': 'Adam', 'lr': 0.005}, 'output_dir': '~/experiments/', 'task': {'adversarial_temperature': 0.5, 'class': 'InductiveKnowledgeGraphCompletion', 'criterion': 'bce', 'full_batch_eval': True, 'model': {'base_layer': {'aggregate_func': 'sum', 'class': 'NBFNetConv', 'dependent': True, 'input_dim': 32, 'layer_norm': True, 'message_func': 'distmult', 'output_dim': 32, 'query_input_dim': 32}, 'class': 'AStarNet', 'delta': 2, 'node_ratio': 0.5, 'num_layer': 6, 'short_cut': True, 'test_node_ratio': 1}, 'num_negative': 32, 'sample_weight': False, 'strict_negative': True}, 'train': {'num_epoch': 20}} Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_train.txt: 100%|█████████████████████████████████████████████████████████████████| 4245/4245 [00:00<00:00, 387625.90it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_valid.txt: 100%|███████████████████████████████████████████████████████████████████| 489/489 [00:00<00:00, 245542.28it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_test.txt: 100%|████████████████████████████████████████████████████████████████████| 492/492 [00:00<00:00, 493447.53it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_train.txt: 100%|█████████████████████████████████████████████████████████████| 1993/1993 [00:00<00:00, 333542.73it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_valid.txt: 100%|███████████████████████████████████████████████████████████████| 206/206 [00:00<00:00, 103488.64it/s] Loading C:\Users\dell/datasets/knowledge_graphs/fb15k237_v1_ind_test.txt: 100%|████████████████████████████████████████████████████████████████| 205/205 [00:00<00:00, 206046.57it/s] 16:02:38 FB15k237Inductive(

entity: 1594

relation: 180

triplet: 5226

) 16:02:38 #train: 4245, #valid: 489, #test: 411 Error in sys.excepthook: Traceback (most recent call last): File "E:\anaconda\envs\TAGNet\lib\linecache.py", line 46, in getlines return updatecache(filename, module_globals) File "E:\anaconda\envs\TAGNet\lib\linecache.py", line 137, in updatecache lines = fp.readlines() File "E:\anaconda\envs\TAGNet\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 4886: invalid continuation byte

Original exception was: Traceback (most recent call last): File "E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py", line 1667, in _run_ninja_build File "E:\anaconda\envs\TAGNet\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "E:\lh\KGR\TAGNet-master\astarnet\script\run.py", line 76, in solver = util.build_solver(cfg, dataset) File "E:\lh\KGR\TAGNet-master\astarnet\reasoning\util.py", line 105, in build_solver task = core.Configurable.load_config_dict(cfg.task) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py", line 269, in load_config_dict v = _Configurable.load_config_dict(v) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py", line 269, in load_config_dict v = _Configurable.load_config_dict(v) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py", line 277, in load_config_dict return cls(new_config) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), *kw) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\core\core.py", line 296, in wrapper return init(self, args, kwargs) File "E:\lh\KGR\TAGNet-master\astarnet\reasoning\layer.py", line 60, in init functional.generalized_rspmm(adjacency, relation_input, input, sum="add", mul="mul") File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\spmm.py", line 378, in generalized_rspmm return Function.apply(sparse.coalesce(), relation, input) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\spmm.py", line 174, in forward forward = spmm.rspmm_add_mul_forward_cpu File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\torch.py", line 26, in getattr return getattr(self.module, key) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\decorator.py", line 102, in get result = self.func(obj) File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\utils\torch.py", line 30, in module return cpp_extension.load(self.name, self.sources, self.extra_cflags, self.extra_cuda_cflags, File "E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py", line 1079, in load return _jit_compile( File "E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py", line 1292, in _jit_compile _write_ninja_file_and_build_library( File "E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py", line 1404, in _write_ninja_file_and_build_library _run_ninja_build( File "E:\anaconda\envs\TAGNet\lib\site-packages\torch\utils\cpp_extension.py", line 1683, in _run_ninja_build RuntimeError: Error building extension 'spmm': [1/5] cl /showIncludes -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\in clude -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site -packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4 244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -Ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\rspmm.cpp /Forspmm.o FAILED: rspmm.o cl /showIncludes -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\tor ch\include\torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDI A GPU Computing Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -Ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\rspmm.cpp /Forspmm.o 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34120 版 版权所有(C) Microsoft Corporation。保留所有权利。

cl: 命令行 warning D9025 :正在重写“/Os”(用“/Ot”) cl: 命令行 warning D9002 :忽略未知选项“-Of” cl: 命令行 warning D9002 :忽略未知选项“-Oa” cl: 命令行 warning D9002 :忽略未知选项“-fopenmp” 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\mutex 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals_core.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vcruntime.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\sal.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\concurrencysal.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vadefs.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\xkeycheck.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include__msvc_chrono.hpp 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals.h E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals.h(20): fatal error C1083: 无法打开包括文件: “crtdbg.h”: No such file or directory
[2/5] cl /showIncludes -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packag es\torch\include\torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files \NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -Ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\spmm.cpp /Fospmm.o FAILED: spmm.o cl /showIncludes -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\tor ch\include\torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDI A GPU Computing Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -Ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\spmm.cpp /Fospmm.o 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34120 版 版权所有(C) Microsoft Corporation。保留所有权利。

cl: 命令行 warning D9025 :正在重写“/Os”(用“/Ot”) cl: 命令行 warning D9002 :忽略未知选项“-Of” cl: 命令行 warning D9002 :忽略未知选项“-Oa” cl: 命令行 warning D9002 :忽略未知选项“-fopenmp” 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\mutex 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals_core.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vcruntime.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\sal.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\concurrencysal.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vadefs.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\xkeycheck.h 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include__msvc_chrono.hpp 注意: 包含文件: E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals.h E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\yvals.h(20): fatal error C1083: 无法打开包括文件: “crtdbg.h”: No such file or directory
[3/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output rspmm.cuda.o.d -Xcudafe --diag_suppress=dll_interface _conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_classhas different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompil er /MD -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include \torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Comp uting Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVER SIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -O3 -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\rspmm.cu -o rspmm.cuda.o FAILED: rspmm.cuda.o C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output rspmm.cuda.o.d -Xcudafe --diag_suppress=dll_interface_confl ict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_differ ent_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\torch \csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16CONVERSIONS _ -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -O3 -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\rspmm.cu -o rspmm.cuda.o E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\crtdefs.h(10): fatal error C1083: ޷򿪰ļ: corecrt.h: No such file or directory rspmm.cu [4/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output spmm.cuda.o.d -Xcudafe --diag_suppress=dllinterface conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_d ifferent_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompile r /MD -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\ torch\csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Compu ting Toolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERS IONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -O3 -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\spmm.cu -o spmm.cuda.o FAILED: spmm.cuda.o C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output spmm.cuda.o.d -Xcudafe --diag_suppress=dll_interface_confli ct_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_differe nt_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\torch\ csrc\api\include -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\TH -IE:\anaconda\envs\TAGNet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing T oolkit\CUDA\v12.4\include" -IE:\anaconda\envs\TAGNet\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -O3 -c C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\torchdrug\layers\functional\extension\spmm.cu -o spmm.cuda.o E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\crtdefs.h(10): fatal error C1083: ޷򿪰ļ: corecrt.h: No such file or directory spmm.cu ninja: build stopped: subcommand failed.

lh5533223 commented 22 hours ago

I found that the environment in the astarnet file was different, so I reconfigured the new environment as follows: torch 1.13.1+cu116 torch-cluster 1.6.0+pt113cu116 torch-geometric 2.6.1 torch-scatter 2.1.0+pt113cu116 torch-sparse 0.6.16+pt113cu116 torchdrug 0.2.1 tornado 6.3.3

However, I reported the following error when running: Traceback (most recent call last): File E:\lh\KGR\TAGNet-master\astarnet\script\run.py:76 solver = util.build_solver(cfg, dataset) File E:\lh\KGR\TAGNet-master\astarnet\reasoning\util.py:105 in build_solver task = core.Configurable.load_config_dict(cfg.task) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\core\core.py:269 in load_config_dict v = _Configurable.load_config_dict(v) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\core\core.py:269 in load_config_dict v = _Configurable.load_config_dict(v) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\core\core.py:277 in load_config_dict return cls(new_config) File ~\AppData\Roaming\Python\Python39\site-packages\decorator.py:232 in fun return caller(func, *(extras + args), *kw) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\core\core.py:296 in wrapper return init(self, args, kwargs) File E:\lh\KGR\TAGNet-master\astarnet\reasoning\layer.py:60 in init functional.generalized_rspmm(adjacency, relation_input, input, sum="add", mul="mul") File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\layers\functional\spmm.py:378 in generalized_rspmm return Function.apply(sparse.coalesce(), relation, input) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\layers\functional\spmm.py:174 in forward forward = spmm.rspmm_add_mul_forward_cpu File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\utils\torch.py:26 in getattr return getattr(self.module, key) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\utils\torch.py:26 in getattr return getattr(self.module, key) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\utils\decorator.py:102 in get result = self.func(obj) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torchdrug\utils\torch.py:30 in module return cpp_extension.load(self.name, self.sources, self.extra_cflags, self.extra_cuda_cflags, File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torch\utils\cpp_extension.py:1284 in load return _jit_compile( File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torch\utils\cpp_extension.py:1534 in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File E:\anaconda\envs\TAGNet_astarnet\lib\site-packages\torch\utils\cpp_extension.py:1936 in _import_module_from_library module = importlib.util.module_from_spec(spec) File :565 in module_from_spec File :1173 in create_module File :228 in _call_with_frames_removed ImportError: DLL load failed while importing spmm: 找不到指定的模块。

(228)_call_with_frames_removed()