MCPcopy Create free account

hub / github.com/allenai/commonsense-kg-completion / functions

Functions174 in github.com/allenai/commonsense-kg-completion

↓ 15 callersMethodread_network
(self, data_dir, keep_fraction=100, split="train", train_network=None)
src/reader.py:313
↓ 14 callersMethodadd_node
:param name: :return:
src/graph.py:46
↓ 14 callersMethodfind_node
:param name: :return:
src/graph.py:68
↓ 11 callersMethoditer_nodes
(self)
src/graph.py:123
↓ 9 callersMethod__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=True, activation=None, self_loop=False, d
src/layers.py:338
↓ 9 callersMethodprint_summary
(self)
src/reader.py:18
↓ 8 callersMethodfind_relation
:param name: :return:
src/graph.py:78
↓ 8 callersMethodget_degree
:param node: :return:
src/graph.py:155
↓ 8 callersMethodread_network
(self, data_dir, split="train", train_network=None)
src/reader.py:128
↓ 7 callersMethodadd_relation
:param name :return:
src/graph.py:58
↓ 7 callersMethodadd_sim_edges_bert
(self)
src/reader.py:75
↓ 6 callersMethodadd_example
(self, src, tgt, relation, weight=1.0, label=1, train_network=None)
src/reader.py:336
↓ 6 callersMethodread_network
(self, data_dir, split="train", train_network=None)
src/reader.py:247
↓ 5 callersMethodforward
(self, g)
src/model.py:234
↓ 4 callersMethodadd_edge
:param node1: source node :param node2: target node :param rel: relation :param label: relation :param weigh
src/graph.py:19
↓ 4 callersMethodcalc_score
(self, e1, rel, target=None)
src/model.py:141
↓ 4 callersFunctionget_vocab_idx
(vocab, token)
src/reader_utils.py:44
↓ 3 callersMethod__init__
(self, num_entities, num_relations, args)
src/decoder.py:41
↓ 3 callersMethodget_graph_embeddings
(self, g, epoch=None)
src/model.py:144
↓ 3 callersMethodget_score
(self, e1, rel, target, embedding)
src/model.py:148
↓ 3 callersMethoditer_edges
(self)
src/graph.py:129
↓ 3 callersFunctionload_data
(dataset, reader_cls, data_dir, sim_relations)
src/run_kbc_subgraph.py:31
↓ 3 callersFunctionsort_and_rank
(score, target)
src/evaluation_utils.py:17
↓ 2 callersMethod__init__
(self, num_nodes, num_rels, args, use_cuda=False)
src/model.py:182
↓ 2 callersFunction_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
lm_finetuning/simple_lm_finetuning.py:615
↓ 2 callersMethodadd_example
(self, src, tgt, relation, weight, label=1, train_network=None)
src/reader.py:158
↓ 2 callersMethodadd_example
(self, src, tgt, relation, weight=1.0, label=1, train_network=None)
src/reader.py:269
↓ 2 callersFunctionbuild_graph_from_triplets
Create a DGL graph.
src/utils.py:163
↓ 2 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s.
src/bert_feature_extractor.py:47
↓ 2 callersFunctionconvert_nodes_to_examples
(node_list)
src/bert_feature_extractor.py:141
↓ 2 callersMethodevaluate
(self, embedding, e1, rel)
src/decoder.py:153
↓ 2 callersMethodforward
(self, g, epoch=None)
src/model.py:85
↓ 2 callersFunctionget_filtered_ranks
(score, target, batch_a, batch_r, e1_to_multi_e2)
src/evaluation_utils.py:24
↓ 2 callersFunctionrandom_word
Masking some random tokens for Language Model task with probabilities as in the original BERT paper. :param tokens: list of str, tokenized se
lm_finetuning/simple_lm_finetuning.py:265
↓ 2 callersMethodsave_to_disk
(self, tensor, idx)
src/bert_feature_extractor.py:264
↓ 1 callersMethodadd_example
(self, src, tgt, rel, label=1)
src/reader.py:218
↓ 1 callersMethodbuild_hidden_layer
(self)
src/model.py:228
↓ 1 callersMethodbuild_input_layer
(self)
src/model.py:225
↓ 1 callersMethodbuild_model
(self, dataset)
src/model.py:203
↓ 1 callersMethodbuild_output_layer
(self)
src/model.py:231
↓ 1 callersFunctioncamel_case_split
(identifier)
src/bert_feature_extractor.py:123
↓ 1 callersFunctioncomp_deg_norm
(g)
src/utils.py:156
↓ 1 callersFunctionconvert_example_to_features
Convert a raw sample (pair of sentences as tokenized strings) into a proper training sample with IDs, LM labels, input_mask, CLS and SEP toke
lm_finetuning/simple_lm_finetuning.py:304
↓ 1 callersFunctiondensify_subgraph
(edges, num_rels, sim_train_e1_to_multi_e2)
src/utils.py:143
↓ 1 callersMethodforward
(self, node_list)
src/bert_feature_extractor.py:184
↓ 1 callersMethodforward_as_init
(self, num_nodes, network=None)
src/bert_feature_extractor.py:226
↓ 1 callersMethodget_corpus_line
Get one sample from corpus consisting of a pair of two subsequent lines from the same doc. :param item: int, index of sample.
lm_finetuning/simple_lm_finetuning.py:158
↓ 1 callersFunctionget_model_name
(args)
src/run_kbc_subgraph.py:61
↓ 1 callersMethodget_next_line
Gets next line of random_file and starts over when reaching end of file
lm_finetuning/simple_lm_finetuning.py:218
↓ 1 callersMethodget_random_line
Get random line from another document for nextSentence task. :return: str, content of one line
lm_finetuning/simple_lm_finetuning.py:195
↓ 1 callersFunctionget_relation_id
(rel_name, train_network)
src/reader_utils.py:55
↓ 1 callersMethodinit
(self)
src/decoder.py:56
↓ 1 callersMethodinit_with_bert
(self, num_nodes, dataset)
src/model.py:174
↓ 1 callersMethoditer_relations
(self)
src/graph.py:126
↓ 1 callersFunctionload_atomic_data
(dataset, sim_relations)
src/run_kbc_fullgraph.py:28
↓ 1 callersFunctionload_atomic_data
(dataset, sim_relations)
src/run_kbc_fullgraph_beaker.py:37
↓ 1 callersFunctionload_cn_data
(dataset, sim_relations, eval_accuracy=False)
src/run_kbc_fullgraph.py:87
↓ 1 callersFunctionload_cn_data
(dataset, sim_relations, eval_accuracy=False)
src/run_kbc_fullgraph_beaker.py:99
↓ 1 callersFunctionload_cn_full_data
(dataset, sim_relations)
src/run_kbc_fullgraph.py:123
↓ 1 callersFunctionload_cn_full_data
(dataset, sim_relations)
src/run_kbc_fullgraph_beaker.py:135
↓ 1 callersFunctionload_fb15k_data
(dataset, sim_relations)
src/run_kbc_fullgraph.py:64
↓ 1 callersFunctionload_fb15k_data
(dataset, sim_relations, keep_fraction=100)
src/run_kbc_fullgraph_beaker.py:76
↓ 1 callersFunctionmain
(args)
src/run_kbc_fullgraph.py:159
↓ 1 callersFunctionmain
(args)
src/run_kbc_fullgraph_beaker.py:171
↓ 1 callersFunctionmain
(args)
src/run_kbc_subgraph.py:95
↓ 1 callersFunctionmain
()
lm_finetuning/simple_lm_finetuning.py:398
↓ 1 callersFunctionmap_to_ids
(vocab, seq)
src/reader_utils.py:51
↓ 1 callersMethodmask_by_schedule
(self, tensor, epoch, epoch_cutoff=100)
src/model.py:68
↓ 1 callersFunctionnegative_sampling
(pos_samples, num_entity, negative_rate)
src/utils.py:183
↓ 1 callersMethodpropagate
(self, g)
src/layers.py:46
↓ 1 callersMethodpropagate
(self, g)
src/layers.py:369
↓ 1 callersMethodrandom_sent
Get one sample from corpus consisting of two sentences. With prob. 50% these are two subsequent sentences from one doc. With 50% the
lm_finetuning/simple_lm_finetuning.py:140
↓ 1 callersMethodregularization_loss
(self, embedding)
src/model.py:133
↓ 1 callersFunctionsample_edge_neighborhood
Edge neighborhood sampling to reduce training graph size
src/utils.py:37
↓ 1 callersFunctionset_seeds
(seed)
src/run_kbc_subgraph.py:24
↓ 1 callersFunctionsim_sim_connect
connect neighbors of node with sim edge type to a candidate node
src/utils.py:206
↓ 1 callersFunctionwrite_topk_tuples
(scores, input_prefs, network, k=50)
src/evaluation_utils.py:284
Method__getitem__
(self, item)
lm_finetuning/simple_lm_finetuning.py:111
Method__init__
(self, dataset)
src/reader.py:122
Method__init__
(self)
src/reader.py:197
Method__init__
(self, dataset)
src/reader.py:241
Method__init__
(self, dataset)
src/reader.py:308
Method__init__
(self, num_entities, num_relations, args)
src/decoder.py:16
Method__init__
(self, num_entities, num_relations, args)
src/decoder.py:98
Method__init__
Difference from ConvE: no reshaping after stacking e_1 and e_r
src/decoder.py:187
Method__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first se
src/bert_feature_extractor.py:21
Method__init__
(self, input_ids, input_mask, segment_ids, label_id=None)
src/bert_feature_extractor.py:40
Method__init__
(self, dataset)
src/bert_feature_extractor.py:153
Method__init__
(self, in_feat, out_feat, bias=None, activation=None, self_loop=False, dropout=0.0)
src/layers.py:14
Method__init__
(self, in_feat, out_feat, num_rels, num_bases=-1, bias=None, activation=None, is_input_layer=
src/layers.py:85
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=None, activation=None, self_loop=False, d
src/layers.py:136
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=None, activation=None, self_loop=False, d
src/layers.py:172
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=True, activation=None, self_loop=False, d
src/layers.py:215
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=True, activation=None, self_loop=False, d
src/layers.py:251
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=True, activation=None, self_loop=False, d
src/layers.py:293
Method__init__
(self, in_feat, out_feat, num_rels)
src/layers.py:382
Method__init__
(self, in_feat, out_feat, num_rels, num_bases, bias=True, activation=None, self_loop=False, d
src/layers.py:424
Method__init__
(self, directed=True)
src/graph.py:8
Method__init__
(self, name, id, lang='en')
src/graph.py:142
Method__init__
(self, name, id)
src/graph.py:170
next →1–100 of 174, ranked by callers