Sample Edges
ReceivesAction: hockey --> play on ice
IsA: hockey --> team sport
IsA: hockey --> violent sport
IsA: hockey --> game
IsA: hockey --> great sport
HasProperty: hockey --> violent
HasProperty: hockey --> cold
IsA: hockey --> type of game
IsA: hockey --> sport of skill and precision
IsA: hockey --> sport game
Average Degree: 1.254213195369327
Adding sim edges..
bert_model_embeddings/nodes-lm-conceptnet/conceptnet_bert_embeddings.pt
Downloading: 100% 232k/232k [00:00<00:00, 423kB/s]
Loading model from bert_model_embeddings/nodes-lm-conceptnet/
Traceback (most recent call last):
File "src/run_kbc_subgraph.py", line 532, in
main(args)
File "src/run_kbc_subgraph.py", line 115, in main
args.sim_relations)
File "src/run_kbc_subgraph.py", line 52, in load_data
train_network.add_sim_edges_bert()
File "/content/drive/My Drive/common_sense/commonsense-kg-completion/src/reader.py", line 82, in add_sim_edges_bert
bert_model = BertLayer(self.dataset)
File "/content/drive/My Drive/common_sense/commonsense-kg-completion/src/bert_feature_extractor.py", line 175, in init
self.bert_model = torch.load(output_model_file, map_location='cpu')
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 571, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 229, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 210, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'bert_model_embeddings/nodes-lm-conceptnet/lm_pytorch_model.bin'
I downloaded the pre-processed data set and unzipped into the data directory.
I ran: !python -u src/run_kbc_subgraph.py --dataset conceptnet --evaluate-every 10 --n-layers 2 --graph-batch-size 60000 --sim_relations --bert_concat
And got this result:
2020-08-27 15:20:31.912536: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 DGL backend not selected or invalid. Assuming PyTorch for now. Setting the default backend to "pytorch". You can change it in the ~/.dgl/config.json file or export the DGLBACKEND environment variable. Valid options are: pytorch, mxnet, tensorflow (all lowercase) Using backend: pytorch Namespace(bert_concat=True, bert_mlp=False, bert_sum=False, cpu_decoding=False, dataset='conceptnet', debug=False, decoder='ConvTransE', decoder_batch_size=128, dropout=0.2, embedding_dim=200, eval_batch_size=500, eval_only=False, evaluate_every=10, feature_map_dropout=0.2, gcn_type='WGCNAttentionLayer', gpu=-1, grad_norm=1.0, graph_batch_size=60000, init_embedding_dim=200, input_dropout=0.2, input_layer='lookup', label_smoothing_epsilon=0.1, layer_norm=False, load_model=None, lr=0.0001, n_bases=100, n_epochs=200, n_hidden=200, n_layers=2, negative_sample=0, no_cuda=False, output_dir='saved_models', regularization=0.1, seed=42, sim_relations=True, sim_sim=False, tying=False, use_bias=False, write_results=False) Number of edges: 99999
Graph Summary
Nodes: 78088 Edges: 100000 Relations: 34 Density: 0.000016
Sample Edges ReceivesAction: hockey --> play on ice IsA: hockey --> team sport IsA: hockey --> violent sport IsA: hockey --> game IsA: hockey --> great sport HasProperty: hockey --> violent HasProperty: hockey --> cold IsA: hockey --> type of game IsA: hockey --> sport of skill and precision IsA: hockey --> sport game
Average Degree: 1.254213195369327 Adding sim edges.. bert_model_embeddings/nodes-lm-conceptnet/conceptnet_bert_embeddings.pt Downloading: 100% 232k/232k [00:00<00:00, 423kB/s] Loading model from bert_model_embeddings/nodes-lm-conceptnet/ Traceback (most recent call last): File "src/run_kbc_subgraph.py", line 532, in
main(args)
File "src/run_kbc_subgraph.py", line 115, in main
args.sim_relations)
File "src/run_kbc_subgraph.py", line 52, in load_data
train_network.add_sim_edges_bert()
File "/content/drive/My Drive/common_sense/commonsense-kg-completion/src/reader.py", line 82, in add_sim_edges_bert
bert_model = BertLayer(self.dataset)
File "/content/drive/My Drive/common_sense/commonsense-kg-completion/src/bert_feature_extractor.py", line 175, in init
self.bert_model = torch.load(output_model_file, map_location='cpu')
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 571, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 229, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 210, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'bert_model_embeddings/nodes-lm-conceptnet/lm_pytorch_model.bin'