MCPcopy Create free account

hub / github.com/MichSchli/AVeriTeC / functions

Functions126 in github.com/MichSchli/AVeriTeC

↓ 8 callersFunctionprint_with_space
(left, right, left_space = 50)
eval.py:197
↓ 7 callersMethodextract_full_comparison_strings
(self, example)
eval.py:167
↓ 6 callersMethodgenerate
(self, text, max_input_length=512, device=None)
models/JustificationGenerationModule.py:175
↓ 4 callersFunctionfreeze_params
(model)
models/JustificationGenerationModule.py:14
↓ 4 callersMethodtriple_to_string
(self, x)
data_loaders/DualEncoderDataLoader.py:52
↓ 3 callersMethodadd_negatives
(self, dataset, neg_count=3)
data_loaders/DualEncoderDataLoader.py:72
↓ 3 callersFunctioncompute_all_pairwise_scores
(src_data, tgt_data, metric)
utils.py:99
↓ 3 callersMethodcompute_pairwise_evidence_score
(self, src, tgt)
eval.py:135
↓ 3 callersMethodencode_sentences
(self, source_sentences, labels)
data_loaders/NoEvidenceDataLoader.py:33
↓ 3 callersMethodencode_sentences
(self, source_sentences, target_sentences)
data_loaders/JustificationProductionDataLoader.py:31
↓ 3 callersMethodencode_sentences
(self, source_sentences, labels)
data_loaders/SequenceClassificationDataLoader.py:33
↓ 3 callersMethodencode_sentences
(self, positives, negatives, max_length=512, pad_to_max_length=False, return_tensors="pt")
data_loaders/DualEncoderDataLoader.py:18
↓ 3 callersMethodload_averitec_file
(self, filepath, add_extra_nee=False, qa_level_labels=False)
data_loaders/NoEvidenceDataLoader.py:49
↓ 3 callersMethodload_averitec_file
(self, filepath)
data_loaders/JustificationProductionDataLoader.py:44
↓ 3 callersMethodload_averitec_file
(self, filepath, add_extra_nee=False, qa_level_labels=False)
data_loaders/SequenceClassificationDataLoader.py:79
↓ 3 callersMethodload_averitec_file
(self, filepath)
data_loaders/DualEncoderDataLoader.py:94
↓ 3 callersFunctionpairwise_meteor
(candidate, reference)
utils.py:12
↓ 3 callersMethodquadruple_to_string
(self, claim, question, answer, bool_explanation="")
data_loaders/SequenceClassificationDataLoader.py:67
↓ 3 callersMethodtokenize_strings
(self, source_sentences, max_length=512, pad_to_max_length=False, return_tensors="pt")
data_loaders/NoEvidenceDataLoader.py:19
↓ 2 callersMethodcompute_loss
(self, batch)
models/JustificationGenerationModule.py:76
↓ 2 callersMethoddo_batch_detokenize
(self, batch)
models/JustificationGenerationModule.py:144
↓ 2 callersMethodevaluate_averitec_veracity_by_type
(self, srcs, tgts, threshold=0.3)
eval.py:45
↓ 2 callersMethodextract_claim_str
(self, example)
data_loaders/JustificationProductionDataLoader.py:63
↓ 2 callersMethodgenerate_and_compute_loss_and_tgts
(self, batch)
models/JustificationGenerationModule.py:135
↓ 2 callersMethodgenerate_for_batch
(self, batch)
models/JustificationGenerationModule.py:158
↓ 2 callersMethodhandle_end_of_epoch_scoring
(self, outputs, acc_scorer, f1_scorer)
models/NaiveSeqClassModule.py:127
↓ 2 callersMethodhandle_end_of_epoch_scoring
(self, outputs, prefix)
models/JustificationGenerationModule.py:116
↓ 2 callersMethodhandle_end_of_epoch_scoring
(self, outputs, acc_scorer, f1_scorer)
models/SequenceClassificationModule.py:120
↓ 2 callersMethodload_tsv_files
(self, filepaths)
data_loaders/DualEncoderDataLoader.py:55
↓ 2 callersFunctionstring_to_search_query
(text, author)
retrieval_coarse/averitec_search.py:109
↓ 2 callersMethodtokenize_strings
(self, source_sentences, max_length=512, pad_to_max_length=False, return_tensors="pt")
data_loaders/JustificationProductionDataLoader.py:17
↓ 1 callersFunctionclaim2prompts
(example)
retrieval_reranking/decorate_with_questions.py:30
↓ 1 callersFunctionclaim2prompts
(example)
retrieval_reranking/decorate_with_questions_vicuna.py:30
↓ 1 callersFunctiondoc2prompt
(doc)
retrieval_coarse/prompt_question_generation_vicuna.py:46
↓ 1 callersFunctiondoc2prompt
(doc)
retrieval_coarse/prompt_question_generation.py:46
↓ 1 callersFunctiondocs2prompt
(top_docs)
retrieval_coarse/prompt_question_generation_vicuna.py:51
↓ 1 callersFunctiondocs2prompt
(top_docs)
retrieval_coarse/prompt_question_generation.py:51
↓ 1 callersMethodevaluate_averitec_score
(self, srcs, tgts)
eval.py:61
↓ 1 callersMethodevaluate_justifications
(self, srcs, tgts)
eval.py:32
↓ 1 callersMethodevaluate_questions_and_answers
(self, srcs, tgts)
eval.py:147
↓ 1 callersMethodevaluate_questions_only
(self, srcs, tgts)
eval.py:98
↓ 1 callersMethodevaluate_veracity
(self, src, tgt)
eval.py:87
↓ 1 callersMethodfreeze_embeds
freeze the positional embedding parameters of the model; adapted from finetune.py
models/JustificationGenerationModule.py:35
↓ 1 callersFunctionget_domain_name
(url)
retrieval_coarse/averitec_search.py:79
↓ 1 callersFunctionget_google_search_results
(api_key, search_engine_id, google_search, sort_date, search_string, page=0)
retrieval_coarse/averitec_search.py:128
↓ 1 callersMethodget_n_best_qas
(self, srcs, tgts, n=3)
eval.py:122
↓ 1 callersFunctionget_page
(url)
retrieval_coarse/html2lines.py:14
↓ 1 callersFunctiongoogle_search
(search_term, api_key, cse_id, **kwargs)
retrieval_coarse/averitec_search.py:90
↓ 1 callersFunctionhtml2lines
(page)
retrieval_coarse/html2lines.py:59
↓ 1 callersFunctionline_correction
(lines, max_size=100)
retrieval_coarse/html2lines.py:35
↓ 1 callersMethodload_dataset_files
(self, averitec_filepaths, tsv_filepaths)
data_loaders/DualEncoderDataLoader.py:115
↓ 1 callersMethodload_tsv_files
(self, filepaths)
data_loaders/SequenceClassificationDataLoader.py:49
↓ 1 callersMethodrun_model
(self, batch)
models/JustificationGenerationModule.py:66
↓ 1 callersMethodshift_tokens_right
Shift input ids one token to the right. https://github.com/huggingface/transformers/blob/main/src/transformers/models/bart/modeling_bart.py.
models/JustificationGenerationModule.py:50
↓ 1 callersMethodtokenize_strings
(self, source_sentences, max_length=512, pad_to_max_length=False, return_tensors="pt")
data_loaders/SequenceClassificationDataLoader.py:19
↓ 1 callersFunctiontriple_to_string
(x)
retrieval_reranking/trained_model_reranker.py:30
↓ 1 callersFunctionurl2lines
(url)
retrieval_coarse/html2lines.py:26
Method__init__
(self, metric="meteor")
eval.py:27
Method__init__
(self, tokenizer, data_file, batch_size, add_extra_nee=False)
data_loaders/NoEvidenceDataLoader.py:12
Method__init__
(self, tokenizer, batch_size)
data_loaders/JustificationProductionDataLoader.py:12
Method__init__
(self, tokenizer, data_file, batch_size, add_extra_nee=False)
data_loaders/SequenceClassificationDataLoader.py:12
Method__init__
(self, tokenizer, data_file, batch_size)
data_loaders/DualEncoderDataLoader.py:12
Method__init__
(self, tokenizer, model, use_question_stance_approach=True, learning_rate=1e-3)
models/NaiveSeqClassModule.py:16
Method__init__
(self, tokenizer, model, learning_rate=1e-3)
models/DualEncoderModule.py:16
Method__init__
(self, tokenizer, model, learning_rate=1e-3, gen_num_beams=2, gen_max_length=100, should_pad_gen=True)
models/JustificationGenerationModule.py:20
Method__init__
(self, tokenizer, model, use_question_stance_approach=True, learning_rate=1e-3)
models/SequenceClassificationModule.py:16
Functioncompute_all_pairwise_edit_distances
(data)
utils.py:90
Functioncompute_all_pairwise_meteor_scores
(data)
utils.py:108
Methodconfigure_optimizers
(self)
models/NaiveSeqClassModule.py:37
Methodconfigure_optimizers
(self)
models/DualEncoderModule.py:30
Methodconfigure_optimizers
(self)
models/JustificationGenerationModule.py:46
Methodconfigure_optimizers
(self)
models/SequenceClassificationModule.py:37
Functioncount_stats
(candidate_dict, reference_dict)
utils.py:15
Functiondelete_if_exists
(filepath)
utils.py:8
Functionedit_distance_custom
(data, X, eps=0.5, min_samples=3)
utils.py:117
Functionedit_distance_dbscan
(data)
utils.py:79
Functionf1_metric
(candidate_dict, reference_dict, pairwise_metric)
utils.py:36
Methodforward
(self, input_ids, **kwargs)
models/NaiveSeqClassModule.py:34
Methodforward
(self, input_ids, **kwargs)
models/DualEncoderModule.py:27
Methodforward
(self, input_ids, **kwargs)
models/JustificationGenerationModule.py:43
Methodforward
(self, input_ids, **kwargs)
models/SequenceClassificationModule.py:34
Functionget_and_store
(url_link, fp, worker)
retrieval_coarse/averitec_search.py:148
Functionlev_metric
(x, y)
utils.py:81
Methodload_tsv_file
(self, filepath)
data_loaders/SequenceClassificationDataLoader.py:74
Methodload_tsv_file
(self, filepath)
data_loaders/DualEncoderDataLoader.py:112
Methodprepare_data
(self)
data_loaders/NoEvidenceDataLoader.py:73
Methodprepare_data
(self)
data_loaders/JustificationProductionDataLoader.py:94
Methodprepare_data
(self)
data_loaders/SequenceClassificationDataLoader.py:128
Methodprepare_data
(self)
data_loaders/DualEncoderDataLoader.py:129
Methodsetup
(self, stage)
data_loaders/NoEvidenceDataLoader.py:82
Methodsetup
(self, stage)
data_loaders/JustificationProductionDataLoader.py:100
Methodsetup
(self, stage)
data_loaders/SequenceClassificationDataLoader.py:137
Methodsetup
(self, stage)
data_loaders/DualEncoderDataLoader.py:144
Functionshift_tokens_right
Shift input ids one token to the right. https://github.com/huggingface/transformers/blob/main/src/transformers/models/bart/modeling_bart.py.
retrieval_reranking/decorate_with_questions.py:110
Functionshift_tokens_right
Shift input ids one token to the right. https://github.com/huggingface/transformers/blob/main/src/transformers/models/bart/modeling_bart.py.
retrieval_reranking/decorate_with_questions_vicuna.py:107
Methodtest_dataloader
(self)
data_loaders/NoEvidenceDataLoader.py:100
Methodtest_dataloader
(self)
data_loaders/JustificationProductionDataLoader.py:116
Methodtest_dataloader
(self)
data_loaders/SequenceClassificationDataLoader.py:155
Methodtest_dataloader
(self)
data_loaders/DualEncoderDataLoader.py:162
Methodtest_epoch_end
(self, outs)
models/NaiveSeqClassModule.py:113
next →1–100 of 126, ranked by callers