SYMBOL INDEX (222 symbols across 29 files) FILE: mdr/qa/basic_tokenizer.py class Tokens (line 16) | class Tokens(object): method __init__ (line 25) | def __init__(self, data, annotators, opts=None): method __len__ (line 30) | def __len__(self): method slice (line 34) | def slice(self, i=None, j=None): method untokenize (line 40) | def untokenize(self): method words (line 44) | def words(self, uncased=False): method offsets (line 55) | def offsets(self): method pos (line 59) | def pos(self): method lemmas (line 67) | def lemmas(self): method entities (line 75) | def entities(self): method ngrams (line 83) | def ngrams(self, n=1, uncased=False, filter_fn=None, as_strings=True): method entity_groups (line 110) | def entity_groups(self): class Tokenizer (line 132) | class Tokenizer(object): method tokenize (line 137) | def tokenize(self, text): method shutdown (line 140) | def shutdown(self): method __del__ (line 143) | def __del__(self): class RegexpTokenizer (line 153) | class RegexpTokenizer(Tokenizer): method __init__ (line 172) | def __init__(self, **kwargs): method tokenize (line 196) | def tokenize(self, text): class SimpleTokenizer (line 236) | class SimpleTokenizer(Tokenizer): method __init__ (line 240) | def __init__(self, **kwargs): method tokenize (line 254) | def tokenize(self, text): FILE: mdr/qa/config.py class ClusterConfig (line 12) | class ClusterConfig(NamedTuple): function common_args (line 16) | def common_args(): function train_args (line 57) | def train_args(): FILE: mdr/qa/data_utils.py function explore (line 11) | def explore(path): function load_corpus (line 23) | def load_corpus(corpus_path="/private/home/xwhan/data/hotpot/tfidf/abstr... FILE: mdr/qa/hotpot_evaluate_v1.py function normalize_answer (line 13) | def normalize_answer(s): function f1_score (line 31) | def f1_score(prediction, ground_truth): function exact_match_score (line 54) | def exact_match_score(prediction, ground_truth): function update_answer (line 57) | def update_answer(metrics, prediction, gold): function update_sp (line 66) | def update_sp(metrics, prediction, gold): function eval (line 88) | def eval(prediction_file, gold_file): FILE: mdr/qa/qa_dataset.py function collate_tokens (line 17) | def collate_tokens(values, pad_idx, eos_idx=None, left_pad=False, move_e... function prepare (line 38) | def prepare(item, tokenizer, special_toks=["[SEP]", "[unused1]", "[unuse... class QAEvalDataset (line 108) | class QAEvalDataset(Dataset): method __init__ (line 110) | def __init__(self, method __len__ (line 150) | def __len__(self): method __getitem__ (line 153) | def __getitem__(self, index): class QADataset (line 188) | class QADataset(Dataset): method __init__ (line 190) | def __init__(self, method __len__ (line 302) | def __len__(self): method __getitem__ (line 305) | def __getitem__(self, index): class MhopSampler (line 391) | class MhopSampler(Sampler): method __init__ (line 396) | def __init__(self, data_source, num_neg=9, n_gpu=8): method __len__ (line 408) | def __len__(self): method __iter__ (line 411) | def __iter__(self): function qa_collate (line 424) | def qa_collate(samples, pad_id=0): FILE: mdr/qa/qa_model.py class BertPooler (line 13) | class BertPooler(nn.Module): method __init__ (line 14) | def __init__(self, config): method forward (line 19) | def forward(self, hidden_states): class QAModel (line 27) | class QAModel(nn.Module): method __init__ (line 29) | def __init__(self, method forward (line 49) | def forward(self, batch): FILE: mdr/qa/qa_trainer.py class TrainerState (line 40) | class TrainerState: method save (line 52) | def save(self, filename: str) -> None: method load (line 61) | def load(cls, filename: str, default: "TrainerState", gpu: int) -> "Tr... class Trainer (line 78) | class Trainer: method __init__ (line 79) | def __init__(self, train_cfg: NamedTuple, cluster_cfg: ClusterConfig) ... method __call__ (line 83) | def __call__(self) -> Optional[float]: method log (line 93) | def log(self, log_data: dict): method checkpoint (line 101) | def checkpoint(self, rm_init=True) -> submitit.helpers.DelayedSubmission: method _setup_process_group (line 117) | def _setup_process_group(self) -> None: method _init_state (line 128) | def _init_state(self) -> None: method _train (line 209) | def _train(self) -> Optional[float]: method _eval (line 283) | def _eval(self) -> dict: FILE: mdr/qa/train_ranker.py function load_saved (line 30) | def load_saved(model, path): function main (line 37) | def main(): function predict (line 212) | def predict(args, model, eval_dataloader, device, logger): FILE: mdr/qa/utils.py function set_global_logging_level (line 13) | def set_global_logging_level(level=logging.ERROR, prefices=[""]): function load_saved (line 29) | def load_saved(model, path, exact=True): function move_to_cuda (line 45) | def move_to_cuda(sample): function convert_to_half (line 65) | def convert_to_half(sample): class AverageMeter (line 85) | class AverageMeter(object): method __init__ (line 88) | def __init__(self): method reset (line 91) | def reset(self): method update (line 97) | def update(self, val, n=1): function normalize (line 104) | def normalize(text): function para_has_answer (line 109) | def para_has_answer(answer, para, tokenizer): function match_answer_span (line 124) | def match_answer_span(p, answer, tokenizer, match="string"): function _is_whitespace (line 145) | def _is_whitespace(char): function _improve_answer_span (line 160) | def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, function whitespace_tokenize (line 173) | def whitespace_tokenize(text): function find_ans_span_with_char_offsets (line 182) | def find_ans_span_with_char_offsets(detected_ans, char_to_word_offset, d... function convert_to_unicode (line 212) | def convert_to_unicode(text): function _is_control (line 232) | def _is_control(char): function _is_punctuation (line 243) | def _is_punctuation(char): class BasicTokenizer (line 259) | class BasicTokenizer(object): method __init__ (line 262) | def __init__(self, do_lower_case=True): method tokenize (line 269) | def tokenize(self, text): method _run_strip_accents (line 284) | def _run_strip_accents(self, text): method _run_split_on_punc (line 295) | def _run_split_on_punc(self, text): method _clean_text (line 315) | def _clean_text(self, text): function get_final_text (line 329) | def get_final_text(pred_text, orig_text, do_lower_case=False, verbose_lo... FILE: mdr/retrieval/config.py class ClusterConfig (line 10) | class ClusterConfig(NamedTuple): function common_args (line 14) | def common_args(): function train_args (line 71) | def train_args(): function encode_args (line 107) | def encode_args(): FILE: mdr/retrieval/criterions.py function mhop_loss (line 114) | def mhop_loss(model, batch, args): function mhop_eval (line 153) | def mhop_eval(outputs, args): function unified_loss (line 185) | def unified_loss(model, batch, args): function unified_eval (line 212) | def unified_eval(outputs, batch): FILE: mdr/retrieval/decomposed_analysis.py function decomposed_errors (line 9) | def decomposed_errors(): function collect_gold_decomposition (line 62) | def collect_gold_decomposition(): function qdmr_utils (line 99) | def qdmr_utils(): function analyze_results (line 128) | def analyze_results(): FILE: mdr/retrieval/mhop_trainer.py class TrainerState (line 42) | class TrainerState: method save (line 54) | def save(self, filename: str) -> None: method load (line 63) | def load(cls, filename: str, default: "TrainerState", gpu: int) -> "Tr... class Trainer (line 80) | class Trainer: method __init__ (line 81) | def __init__(self, train_cfg: NamedTuple, cluster_cfg: ClusterConfig) ... method __call__ (line 85) | def __call__(self) -> Optional[float]: method log (line 95) | def log(self, log_data: dict): method checkpoint (line 103) | def checkpoint(self, rm_init=True) -> submitit.helpers.DelayedSubmission: method _setup_process_group (line 119) | def _setup_process_group(self) -> None: method _init_state (line 130) | def _init_state(self) -> None: method _train (line 204) | def _train(self) -> Optional[float]: method _eval (line 271) | def _eval(self) -> float: FILE: mdr/retrieval/single_trainer.py class TrainerState (line 41) | class TrainerState: method save (line 53) | def save(self, filename: str) -> None: method load (line 62) | def load(cls, filename: str, default: "TrainerState", gpu: int) -> "Tr... class Trainer (line 79) | class Trainer: method __init__ (line 80) | def __init__(self, train_cfg: NamedTuple, cluster_cfg: ClusterConfig) ... method __call__ (line 84) | def __call__(self) -> Optional[float]: method log (line 94) | def log(self, log_data: dict): method checkpoint (line 102) | def checkpoint(self, rm_init=True) -> submitit.helpers.DelayedSubmission: method _setup_process_group (line 118) | def _setup_process_group(self) -> None: method _init_state (line 129) | def _init_state(self) -> None: method _train (line 203) | def _train(self) -> Optional[float]: method _eval (line 276) | def _eval(self) -> float: FILE: mdr/retrieval/train_single.py function main (line 111) | def main(): function predict (line 295) | def predict(args, model, eval_dataloader, device, logger): FILE: mdr/retrieval/utils/basic_tokenizer.py class Tokens (line 18) | class Tokens(object): method __init__ (line 27) | def __init__(self, data, annotators, opts=None): method __len__ (line 32) | def __len__(self): method slice (line 36) | def slice(self, i=None, j=None): method untokenize (line 42) | def untokenize(self): method words (line 46) | def words(self, uncased=False): method offsets (line 57) | def offsets(self): method pos (line 61) | def pos(self): method lemmas (line 69) | def lemmas(self): method entities (line 77) | def entities(self): method ngrams (line 85) | def ngrams(self, n=1, uncased=False, filter_fn=None, as_strings=True): method entity_groups (line 112) | def entity_groups(self): class Tokenizer (line 134) | class Tokenizer(object): method tokenize (line 139) | def tokenize(self, text): method shutdown (line 142) | def shutdown(self): method __del__ (line 145) | def __del__(self): class RegexpTokenizer (line 155) | class RegexpTokenizer(Tokenizer): method __init__ (line 174) | def __init__(self, **kwargs): method tokenize (line 198) | def tokenize(self, text): class SimpleTokenizer (line 238) | class SimpleTokenizer(Tokenizer): method __init__ (line 242) | def __init__(self, **kwargs): method tokenize (line 256) | def tokenize(self, text): function normalize (line 303) | def normalize(text): function filter_word (line 308) | def filter_word(text): function filter_ngram (line 317) | def filter_ngram(gram, mode='any'): FILE: mdr/retrieval/utils/mhop_utils.py function pick_bridge_v0 (line 16) | def pick_bridge_v0(title2linked, title2doc, titles, q, ans): function load_annotated (line 31) | def load_annotated(path="/private/home/xwhan/data/hotpot/tfidf/abstracts... function normalize_answer (line 37) | def normalize_answer(s): function hotpot_sp_data (line 55) | def hotpot_sp_data(raw_path): function add_qid (line 106) | def add_qid(raw_path): function add_bridge_ann (line 135) | def add_bridge_ann(raw_path): function check_2hop (line 166) | def check_2hop(raw_path): function add_sp_labels (line 173) | def add_sp_labels(raw_path, input_file, save_path, function explore_QDMR (line 212) | def explore_QDMR(path="/private/home/xwhan/data/Break-dataset/QDMR-high-... function add_sents_to_corpus_dict (line 249) | def add_sents_to_corpus_dict(): FILE: mdr/retrieval/utils/tokenizer.py function convert_tokens_to_ids (line 32) | def convert_tokens_to_ids(vocab, tokens): function whitespace_tokenize (line 39) | def whitespace_tokenize(text): function convert_to_unicode (line 48) | def convert_to_unicode(text): function _is_whitespace (line 68) | def _is_whitespace(char): function _is_control (line 80) | def _is_control(char): class BasicTokenizer (line 91) | class BasicTokenizer(object): method __init__ (line 94) | def __init__(self, do_lower_case=True): method tokenize (line 101) | def tokenize(self, text): method _run_strip_accents (line 116) | def _run_strip_accents(self, text): method _run_split_on_punc (line 127) | def _run_split_on_punc(self, text): method _clean_text (line 147) | def _clean_text(self, text): function _is_punctuation (line 161) | def _is_punctuation(char): function process (line 177) | def process(s, tokenizer): FILE: mdr/retrieval/utils/utils.py function load_saved (line 10) | def load_saved(model, path, exact=True): function move_to_cuda (line 24) | def move_to_cuda(sample): function convert_to_half (line 43) | def convert_to_half(sample): class AverageMeter (line 63) | class AverageMeter(object): method __init__ (line 66) | def __init__(self): method reset (line 69) | def reset(self): method update (line 75) | def update(self, val, n=1): function normalize (line 82) | def normalize(text): class DocDB (line 87) | class DocDB(object): method __init__ (line 93) | def __init__(self, db_path=None): method __enter__ (line 97) | def __enter__(self): method __exit__ (line 100) | def __exit__(self, *args): method close (line 103) | def close(self): method get_doc_ids (line 107) | def get_doc_ids(self): method get_doc_text (line 115) | def get_doc_text(self, doc_id): function para_has_answer (line 126) | def para_has_answer(answer, para, tokenizer): function complex_ans_recall (line 142) | def complex_ans_recall(): FILE: scripts/demo.py function init_retrieval (line 28) | def init_retrieval(args): function init_reader (line 54) | def init_reader(args): FILE: scripts/encode_corpus.py function main (line 41) | def main(): function predict (line 95) | def predict(model, eval_dataloader): FILE: scripts/end2end.py function convert_hnsw_query (line 49) | def convert_hnsw_query(query_vectors): FILE: scripts/eval/eval_mhop_retrieval.py function convert_hnsw_query (line 44) | def convert_hnsw_query(query_vectors): FILE: scripts/eval/eval_retrieval.py function init (line 61) | def init(): function get_score (line 66) | def get_score(answer_doc, topk=20): function add_marker_q (line 85) | def add_marker_q(tokenizer, q): FILE: scripts/train_mhop.py function main (line 54) | def main(): function predict (line 233) | def predict(args, model, eval_dataloader, device, logger): FILE: scripts/train_momentum.py function main (line 28) | def main(): function predict (line 214) | def predict(args, model, eval_dataloader, device, logger): FILE: scripts/train_qa.py function load_saved (line 33) | def load_saved(model, path): function main (line 40) | def main(): function predict (line 220) | def predict(args, model, eval_dataloader, logger, fixed_thresh=None): function eval_final (line 380) | def eval_final(args, model, eval_dataloader, weight=0.8, gpu=True): FILE: submitit/submitit_train.py function get_shared_folder (line 20) | def get_shared_folder() -> Path: function get_init_file (line 23) | def get_init_file() -> Path: function grid_parameters (line 31) | def grid_parameters(grid: Dict): function grid_search (line 43) | def grid_search(args): FILE: submitit/submitit_train_qa.py function get_shared_folder (line 19) | def get_shared_folder() -> Path: function get_init_file (line 22) | def get_init_file() -> Path: function grid_parameters (line 30) | def grid_parameters(grid: Dict): function grid_search (line 42) | def grid_search(args):