MCPcopy Create free account

hub / github.com/OSU-NLP-Group/Loop-Think-Generalize / functions

Functions75 in github.com/OSU-NLP-Group/Loop-Think-Generalize

↓ 4 callersFunctionload_vocab
(vocab_path)
gpt_utils_extrapolation.py:138
↓ 3 callersFunctionevaluate_model_test
(model, dataloader, device, pred_pos="last_token", pad_idx=0)
gpt_utils_extrapolation.py:199
↓ 3 callersFunctionrandom_sample_with_type
(facts, sample_size, fact_type)
create_dataset.py:40
↓ 3 callersFunctionsave_combined_facts
(combined_facts, output_file)
create_dataset.py:28
↓ 2 callersFunctionadd_type_label
(facts, fact_type)
create_dataset.py:34
↓ 2 callersFunctionensure_dir
(p: str)
logit_margin_analysis.py:32
↓ 2 callersFunctionplot_margin_grid
( results: Dict[str, Any], out_png: str, out_pdf: str, title: str = "", )
logit_margin_analysis.py:211
↓ 2 callersFunctionprocess_facts
(facts)
getNhopfact.py:68
↓ 2 callersFunctionsafe_tag
(s: str)
logit_margin_analysis.py:36
↓ 2 callersFunctionsave_facts_to_file
(facts, output_file)
getNhopfact.py:78
↓ 2 callersMethodtokenize
(self, text)
gpt_utils_extrapolation.py:21
↓ 2 callersMethodtokenize
(self, text)
gpt_utils_extrapolation.py:61
↓ 2 callersMethodtokenize
(self, text)
gpt_utils_systematicity.py:18
↓ 2 callersMethodtokenize
(self, text)
gpt_utils_systematicity.py:51
↓ 2 callersMethodtokens_to_ids
(self, tokens)
gpt_utils_extrapolation.py:24
↓ 2 callersMethodtokens_to_ids
(self, tokens)
gpt_utils_extrapolation.py:64
↓ 2 callersMethodtokens_to_ids
(self, tokens)
gpt_utils_systematicity.py:21
↓ 2 callersMethodtokens_to_ids
(self, tokens)
gpt_utils_systematicity.py:54
↓ 1 callersMethod__init__
(self, vocab, data)
gpt_utils_extrapolation.py:16
↓ 1 callersMethod__init__
(self, file_path, vocab)
gpt_utils_systematicity.py:12
↓ 1 callersFunction_convert
(obj)
logit_margin_analysis.py:168
↓ 1 callersFunctionbuild_atomic
(num_entities, num_relations, out_degree=10, seed=42)
getNhopfact.py:83
↓ 1 callersFunctionbuild_nhop_facts_fast
(atomic_facts, n, max_facts=15750)
getNhopfact.py:145
↓ 1 callersFunctionclamp_first_pad_pos_from_input_lengths
(input_lengths: torch.Tensor, T: int)
logit_margin_analysis.py:61
↓ 1 callersFunctioncombine_facts
(*fact_lists)
create_dataset.py:16
↓ 1 callersFunctioncompute_global_ylim
(results: Dict[str, Any], model_order: List[str])
logit_margin_analysis.py:190
↓ 1 callersFunctioncount_hops
Count number of relations (hops) in input_text.
train_extrapolation.py:116
↓ 1 callersFunctioncount_trainable_params
(model)
train_systematicity.py:135
↓ 1 callersFunctioncustom_collate_test
(batch, max_len=25)
gpt_utils_extrapolation.py:113
↓ 1 callersFunctionembed_like_model
(model: RecurrentGPT2Block, input_ids: torch.Tensor)
logit_margin_analysis.py:46
↓ 1 callersFunctioneval_split_margin
( model: RecurrentGPT2Block, dataloader, iters: int, device: torch.device, split_name: str
logit_margin_analysis.py:72
↓ 1 callersFunctionevaluate_model_test
(model, dataloader, device, pad_idx=0)
gpt_utils_systematicity.py:109
↓ 1 callersFunctionevaluate_model_test_adaptive_metrics
( model, dataloader, device, max_recurrence, pred_pos="last_token",
gpt_utils_extrapolation.py:235
↓ 1 callersFunctionform_items
(fact)
getNhopfact.py:57
↓ 1 callersMethodforward_adapative
( self, input_ids, attention_mask, input_lengths,
gpt_utils_extrapolation.py:504
↓ 1 callersMethodforward_adapative_ent
(self, input_ids, attention_mask, input_lengths, pred_pos="last_token", H0=3.0, H1=12.0,
gpt_utils_extrapolation.py:404
↓ 1 callersFunctionload_facts_from_file
(file_path)
getNhopfact.py:189
↓ 1 callersFunctionload_results_json
(path: str)
logit_margin_analysis.py:185
↓ 1 callersFunctionload_single_model
( checkpoint_path: str, config: GPT2Config, iters: int, device: torch.device, pos_type: st
logit_margin_analysis.py:140
↓ 1 callersFunctionload_vocab
(vocab_path)
gpt_utils_systematicity.py:100
↓ 1 callersFunctionmain
()
logit_margin_analysis.py:318
↓ 1 callersFunctionmake_attn_4d
(attention_mask: torch.Tensor, dtype: torch.dtype)
logit_margin_analysis.py:40
↓ 1 callersFunctionparse_args
()
inference_extrapolation_adaptive.py:14
↓ 1 callersFunctionparse_args
()
train_extrapolation.py:25
↓ 1 callersFunctionparse_args
()
inference_extrapolation.py:13
↓ 1 callersFunctionparse_args
()
train_systematicity.py:14
↓ 1 callersFunctionprint_random_examples
(facts, num_examples=5)
getNhopfact.py:195
↓ 1 callersFunctionsave_results_json
(path: str, results: Dict[str, Any])
logit_margin_analysis.py:167
↓ 1 callersFunctionsave_split_facts
(train_facts, test_facts, hop, output_dir=data_dir)
getNhopfact.py:219
↓ 1 callersFunctionset_seed
(seed: int)
logit_margin_analysis.py:23
↓ 1 callersFunctionsplit_facts
(facts, train_size=15000, test_size=750)
getNhopfact.py:212
↓ 1 callersFunctionsplit_to_display_label
(split_name: str)
logit_margin_analysis.py:65
↓ 1 callersFunctiontrain_model
(model, dataloader, test_dataloader, args, test_type, start_epoch=0, start_time=time.time(), h
train_extrapolation.py:124
↓ 1 callersFunctiontrain_model
(model, dataloader, valid_dataloader, test_dataloader, args)
train_systematicity.py:58
Method__getitem__
(self, idx)
gpt_utils_extrapolation.py:30
Method__getitem__
(self, idx)
gpt_utils_extrapolation.py:70
Method__getitem__
(self, idx)
gpt_utils_systematicity.py:27
Method__getitem__
(self, idx)
gpt_utils_systematicity.py:60
Method__init__
(self, data_dir, file, vocab, all_splits=None)
gpt_utils_extrapolation.py:48
Method__init__
(self, config, num_iterations, positional_embedding_type='learned', input_injection=False, c_
gpt_utils_extrapolation.py:323
Method__init__
(self, file_path, vocab, split=None)
gpt_utils_systematicity.py:43
Method__init__
(self, config, num_iterations)
gpt_utils_systematicity.py:142
Method__len__
(self)
gpt_utils_extrapolation.py:27
Method__len__
(self)
gpt_utils_extrapolation.py:67
Method__len__
(self)
gpt_utils_systematicity.py:24
Method__len__
(self)
gpt_utils_systematicity.py:57
Functionbuild_dicts
(entities)
getNhopfact.py:16
Functionchoose
(arr, ratio_or_count)
getNhopfact.py:27
Functioncustom_collate
(batch, max_len=25)
gpt_utils_extrapolation.py:88
Functioncustom_collate
(batch)
gpt_utils_systematicity.py:76
Functioncustom_collate_test
(batch)
gpt_utils_systematicity.py:88
Functionevaluate_model_test_adaptive
(model, dataloader, device, pred_pos="last_token", max_recurrence=16, pad_idx=0)
gpt_utils_extrapolation.py:148
Methodforward
(self, input_ids, attention_mask=None)
gpt_utils_extrapolation.py:366
Methodforward
(self, input_ids, attention_mask=None)
gpt_utils_systematicity.py:160
Functionsplit
(arr, ratio_or_count)
getNhopfact.py:40