MCPcopy Create free account

hub / github.com/ag1988/injecting_numeracy / functions

Functions329 in github.com/ag1988/injecting_numeracy

↓ 23 callersMethod__init__
(self, config, output_attentions=False, keep_multihead_output=False)
pre_training/gen_bert/squad_finetuning/modeling.py:467
↓ 20 callersMethod__init__
(self, config, output_attentions=False, keep_multihead_output=False)
pre_training/gen_bert/modeling.py:499
↓ 10 callersMethodload
(module, prefix='')
pre_training/gen_bert/modeling.py:779
↓ 10 callersFunctionnumber_formation
(number_words)
pre_training/gen_bert/w2n.py:90
↓ 10 callersFunctionread_file
(file)
pre_training/gen_bert/create_examples_n_features.py:569
↓ 9 callersMethodfrom_pretrained
Instantiate a BertPreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained model fil
pre_training/gen_bert/modeling.py:656
↓ 9 callersMethodupdate
(self, container_identifier, container_state_update, parent_identifiers_types)
textual_data_generation/generators/state.py:35
↓ 8 callersFunctionconcat_container_entity_attributes
(entity_attributes, separator=' ')
textual_data_generation/generators/state.py:168
↓ 8 callersMethodget_container
(self, container_identifier)
textual_data_generation/generators/state.py:64
↓ 8 callersMethodget_container_identifiers
(self)
textual_data_generation/generators/state.py:45
↓ 8 callersMethodvalues
(cls)
textual_data_generation/utils/collections.py:12
↓ 7 callersMethod__init__
(self, debug=False)
textual_data_generation/generators/qa_generator.py:16
↓ 7 callersMethodexists
(self, container_identifier)
textual_data_generation/generators/state.py:42
↓ 6 callersMethodadd
(self, container_identifier, container_state_updates, parent_identifiers)
textual_data_generation/generators/state.py:38
↓ 6 callersMethodload
(module, prefix='')
pre_training/gen_bert/squad_finetuning/modeling.py:746
↓ 6 callersMethodmask
(ids, mask=None)
pre_training/gen_bert/modeling.py:1038
↓ 5 callersFunctionwrite_file
(data, file)
pre_training/gen_bert/create_examples_n_features.py:582
↓ 4 callersFunction_is_number
(text: str)
pre_training/gen_bert/drop_eval.py:61
↓ 4 callersMethodfrom_pretrained
Instantiate a BertPreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained model fil
pre_training/gen_bert/squad_finetuning/modeling.py:623
↓ 4 callersFunctionget_instant_obj_value
(instant)
textual_data_generation/generators/generator_utils.py:109
↓ 4 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
pre_training/gen_bert/squad_utils.py:102
↓ 4 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
pre_training/gen_bert/squad_finetuning/evaluate-v1.1.py:11
↓ 4 callersFunctionprocess
(text)
pre_training/gen_bert/finetune_on_drop.py:657
↓ 4 callersFunctionprune_linear_layer
Prune a linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_grad=True.
pre_training/gen_bert/modeling.py:73
↓ 4 callersFunctionprune_linear_layer
Prune a linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_grad=True.
pre_training/gen_bert/squad_finetuning/modeling.py:69
↓ 3 callersFunctiondetokenize
(tok_tokens)
pre_training/gen_bert/finetune_on_drop.py:712
↓ 3 callersFunctionevaluate
(args, model, eval_dataloader, device, n_train)
pre_training/gen_bert/finetune_on_drop.py:551
↓ 3 callersMethodff
(self, input_dim, hidden_dim, output_dim)
pre_training/gen_bert/modeling.py:1170
↓ 3 callersFunctioninstantiation_by_type
(sents_instantiation)
textual_data_generation/generators/generator_utils.py:129
↓ 3 callersFunctionsplit_tokens_by_hyphen
(tokens: List[Token])
pre_training/gen_bert/create_examples_n_features.py:158
↓ 3 callersMethodtranspose_for_scores
(self, x)
pre_training/gen_bert/modeling.py:355
↓ 3 callersMethodtranspose_for_scores
(self, x)
pre_training/gen_bert/squad_finetuning/modeling.py:344
↓ 2 callersFunction_answer_to_bags
( answer: Union[str, List[str], Tuple[str, ...]] )
pre_training/gen_bert/drop_eval.py:76
↓ 2 callersFunction_get_best_indexes
Get the n-best logits from a list.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:738
↓ 2 callersMethod_span_log_likelihood
(self, answer_as_spans, span_start_log_probs, span_end_log_probs)
pre_training/gen_bert/modeling.py:1297
↓ 2 callersFunction_strip_spaces
(text)
pre_training/gen_bert/squad_utils.py:35
↓ 2 callersFunction_strip_spaces
(text)
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:670
↓ 2 callersMethod_update_container_state
(self, container_identifier, container_state_update, parent_identifiers_types)
textual_data_generation/generators/state.py:68
↓ 2 callersFunctionadd_passage_examples
(examples, domain, passage_id, new_examples)
textual_data_generation/generate_examples.py:54
↓ 2 callersFunctionadjust_container_type
(container_state_update, new_container_type)
textual_data_generation/generators/state.py:201
↓ 2 callersFunctionanswer_json_to_strings
Takes an answer JSON blob from the DROP data release and converts it into strings used for evaluation.
pre_training/gen_bert/drop_eval.py:166
↓ 2 callersMethodare_containers_related
(self, first_identifier, second_identifier)
textual_data_generation/generators/state.py:163
↓ 2 callersFunctionconvert_answer_spans
(spans, orig_to_tok_index, all_len, all_tokens)
pre_training/gen_bert/create_examples_n_features.py:420
↓ 2 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:203
↓ 2 callersFunctionconvert_synthetic_texual_to_drop
(data)
pre_training/convert_synthetic_numeric_to_drop.py:14
↓ 2 callersMethodconvert_word_to_number
Currently we only support limited types of conversion.
pre_training/gen_bert/create_examples_n_features.py:344
↓ 2 callersMethodencode
(self, input_ids, token_type_ids=None, input_mask=None, random_shift=False)
pre_training/gen_bert/modeling.py:1029
↓ 2 callersMethodfind_valid_spans
(passage_tokens: List[Token], answer_texts: List[List[Token]])
pre_training/gen_bert/create_examples_n_features.py:380
↓ 2 callersMethodgenerate_example
(self)
textual_data_generation/generators/generator.py:122
↓ 2 callersFunctionget_abstracted_token_info
(vocab, templates, token, token_idx, num_tokens)
textual_data_generation/generators/generator_utils.py:15
↓ 2 callersFunctionget_instant_attribute_values
(update, instant, attr_key)
textual_data_generation/generators/generator_utils.py:118
↓ 2 callersFunctionget_token_instant_obj
(token_info, selected_candidate, is_instant_obj=False)
textual_data_generation/generators/generator_utils.py:87
↓ 2 callersFunctioninference
(args, model, eval_dataloader, device, tokenizer)
pre_training/gen_bert/finetune_on_drop.py:603
↓ 2 callersFunctionmake_output_dir
(args, scripts_to_save=[sys.argv[0]])
pre_training/gen_bert/finetune_on_drop.py:198
↓ 2 callersFunctionmetric_max_over_ground_truths
(metric_fn, prediction, ground_truths)
pre_training/gen_bert/squad_finetuning/evaluate-v1.1.py:46
↓ 2 callersFunctionpredict
(args, model, eval_examples, eval_features, eval_dataloader, dev_data, device, write_preds=False)
pre_training/gen_bert/squad_finetuning/run_squad.py:387
↓ 2 callersFunctionread_squad_examples
Read a SQuAD json file into a list of SquadExample.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:105
↓ 2 callersFunctionsave
(args, model, tokenizer, train_state_dict)
pre_training/gen_bert/finetune_on_drop.py:534
↓ 2 callersFunctionsplit_digits
(wps: List[str])
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:190
↓ 2 callersMethodsummary_vector
(self, encoding, mask, in_type="passage")
pre_training/gen_bert/modeling.py:1176
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
pre_training/gen_bert/modeling.py:268
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
pre_training/gen_bert/squad_finetuning/modeling.py:264
↓ 1 callersMethod__repr__
(self)
pre_training/gen_bert/create_examples_n_features.py:61
↓ 1 callersMethod__repr__
(self)
pre_training/gen_bert/create_examples_n_features.py:121
↓ 1 callersMethod__repr__
(self)
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:60
↓ 1 callersFunction_align_bags
Takes gold and predicted answer sets and first finds the optimal 1-1 alignment between them and gets maximum metric values over all the answe
pre_training/gen_bert/drop_eval.py:92
↓ 1 callersFunction_check_is_max_context
Check if this is the 'max context' doc span for the token.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:405
↓ 1 callersFunction_compute_f1
(predicted_bag: Set[str], gold_bag: Set[str])
pre_training/gen_bert/drop_eval.py:110
↓ 1 callersFunction_compute_softmax
Compute softmax probability over raw logits.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:750
↓ 1 callersMethod_generate
(self, state, instantiation)
textual_data_generation/generators/qa_generator.py:36
↓ 1 callersMethod_generate_passage
(self)
textual_data_generation/generators/generator.py:147
↓ 1 callersFunction_improve_answer_span
Returns tokenized answer spans that better match the annotated answer.
pre_training/gen_bert/squad_finetuning/run_squad_dataset_utils.py:366
↓ 1 callersMethod_instantiate_abstracted_sent
(self, abs_sent, instantiation)
textual_data_generation/generators/generator.py:172
↓ 1 callersMethod_is_compatible
(self, state, instantiation)
textual_data_generation/generators/qa_generator.py:33
↓ 1 callersMethod_load_templates
(self, templates_file)
textual_data_generation/generators/generator.py:82
↓ 1 callersMethod_load_vocab
(self, vocab_file)
textual_data_generation/generators/generator.py:66
↓ 1 callersFunction_lower
(text: str)
pre_training/gen_bert/drop_eval.py:41
↓ 1 callersFunction_match_numbers_if_present
(gold_bag: Set[str], predicted_bag: Set[str])
pre_training/gen_bert/drop_eval.py:128
↓ 1 callersFunction_normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
pre_training/gen_bert/drop_eval.py:49
↓ 1 callersFunction_normalize_number
(text: str)
pre_training/gen_bert/drop_eval.py:69
↓ 1 callersMethod_passage_span_module
(self, passage_out, passage_mask)
pre_training/gen_bert/modeling.py:1255
↓ 1 callersMethod_question_span_module
(self, passage_vector, question_out, question_mask)
pre_training/gen_bert/modeling.py:1274
↓ 1 callersMethod_read
(self, file_path: str)
pre_training/gen_bert/create_examples_n_features.py:196
↓ 1 callersFunction_remove_articles
(text: str)
pre_training/gen_bert/drop_eval.py:22
↓ 1 callersFunction_remove_punc
(text: str)
pre_training/gen_bert/drop_eval.py:34
↓ 1 callersFunction_tokenize
(text: str)
pre_training/gen_bert/drop_eval.py:45
↓ 1 callersMethod_valid_entity_set
(entity_state_objs)
textual_data_generation/generators/qa_generator.py:209
↓ 1 callersFunction_white_space_fix
(text: str)
pre_training/gen_bert/drop_eval.py:27
↓ 1 callersFunctionapply_container_update_to_state
(sent_state, update, sent_instantiation, separator)
textual_data_generation/generators/generator_utils.py:144
↓ 1 callersFunctionarg_min_max_expression
(wrds, args)
pre_training/numeric_data_generation/gen_numeric_data.py:75
↓ 1 callersFunctioncomparable_container_states
(first_state, second_state, check_cont_type=True)
textual_data_generation/generators/state.py:191
↓ 1 callersMethodconvert_example_to_features
(self, example)
pre_training/gen_bert/train_textual_with_numeric.py:90
↓ 1 callersMethodconvert_example_to_features
(self, example)
pre_training/gen_bert/finetune_on_drop.py:90
↓ 1 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s.
pre_training/gen_bert/create_examples_n_features.py:435
↓ 1 callersFunctionconvert_synthetic_texual_to_drop
(data)
pre_training/convert_synthetic_texual_to_drop.py:15
↓ 1 callersMethodconvert_to_input_features
(self, drop_example, drop_feature)
pre_training/gen_bert/train_textual_with_numeric.py:162
↓ 1 callersMethodconvert_to_input_features
(self, drop_example, drop_feature)
pre_training/gen_bert/finetune_on_drop.py:158
↓ 1 callersFunctioncreate_instances_from_document
( document, max_seq_length, short_seq_prob, masked_lm_prob, max_predictions_per_seq, whole_wor
pre_training/gen_train_data_MLM.py:76
↓ 1 callersFunctioncreate_masked_lm_predictions
Creates the predictions for the masked LM objective. This is mostly copied from the Google BERT repo, but with several refactors to clean it up an
pre_training/gen_train_data_MLM.py:15
↓ 1 callersFunctiondate_diff
(typ='')
pre_training/numeric_data_generation/gen_numeric_data.py:130
next →1–100 of 329, ranked by callers