Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amy-hyunji/Generative-Multihop-Retrieval
/ functions
Functions
48 in github.com/amy-hyunji/Generative-Multihop-Retrieval
⨍
Functions
48
◇
Types & classes
2
↓ 8 callers
Method
ids_to_text
(self, ids)
src/models.py:279
↓ 6 callers
Method
normalize_answer
(self, s)
src/models.py:220
↓ 3 callers
Method
calculate_ret_scores
(self, preds: List[str], targets: str, is_test=False)
src/models.py:265
↓ 3 callers
Method
get_dataset
(self, split)
src/models.py:80
↓ 2 callers
Method
_generate_wo_constraint
(self, input_ids, input_attn, target_attn=None)
src/models.py:175
↓ 2 callers
Method
_remove_dup
(self, sen_list)
src/models.py:247
↓ 2 callers
Method
_temporal_encode
(self, input_list: List[str])
src/models.py:418
↓ 1 callers
Method
_calculate_em
(self, pred: str, gt: str)
src/models.py:256
↓ 1 callers
Method
_calculate_recall
(self, pred: List[str], gt: str)
src/models.py:259
↓ 1 callers
Method
_calculate_tok_f1
(self, pred_list, gt)
src/models.py:317
↓ 1 callers
Method
_dynamic_test_step
(self, batch)
src/models.py:363
↓ 1 callers
Method
_fixed_test_step
(self, batch)
src/models.py:395
↓ 1 callers
Method
_generate_w_constraint
(self, input_ids, input_attn, target_attn=None)
src/models.py:188
↓ 1 callers
Method
_get_from_trie
(self, input_ids, trie_dict)
src/models.py:162
↓ 1 callers
Method
_lm_mem_step
(self, batch)
src/models.py:291
↓ 1 callers
Method
_loss
(self, batch)
src/models.py:120
↓ 1 callers
Method
_score
(self, batch)
src/models.py:204
↓ 1 callers
Method
_tok_f1_score
(self, pred, gt)
src/models.py:304
↓ 1 callers
Method
_val_step
(self, batch)
src/models.py:287
↓ 1 callers
Method
calculate_mem_scores
(self, preds, targets)
src/models.py:320
↓ 1 callers
Method
convert_fixed_to_dynamic
(self, dataset)
src/data.py:68
↓ 1 callers
Method
convert_to_features
(self, batch, idx)
src/data.py:41
↓ 1 callers
Method
get
(self, input_ids)
src/models.py:171
↓ 1 callers
Method
lmap
(self, f, x)
src/models.py:276
↓ 1 callers
Function
main
(args, train_params)
src/train.py:31
↓ 1 callers
Function
set_seed
(seed)
src/train.py:24
↓ 1 callers
Method
train_dataloader
(self)
src/models.py:87
Method
__getitem__
(self, idx)
src/data.py:83
Method
__init__
(self, args)
src/models.py:31
Method
__init__
(self, tokenizer, hparams, split)
src/data.py:15
Method
__len__
(self)
src/data.py:38
Method
_calculate_hop_f1
(self, pred: List[str], gt: List[str])
src/models.py:262
Method
configure_optimizers
(self)
src/models.py:455
Method
forward
( self, input_ids, attention_mask=None, decoder_input_ids=None, decode
src/models.py:133
Method
lower
(text)
src/models.py:242
Method
on_save_checkpoint
(self, checkpoint)
src/models.py:506
Method
remove_articles
(text)
src/models.py:232
Method
remove_punc
(text)
src/models.py:238
Method
remove_sp
(text)
src/models.py:221
Method
remove_space_at_ends
(text)
src/models.py:225
Method
test_dataloader
(self)
src/models.py:109
Method
test_epoch_end
(self, outputs)
src/models.py:448
Method
test_step
(self, batch, batch_idx)
src/models.py:428
Method
training_step
(self, batch, batch_idx)
src/models.py:149
Method
val_dataloader
(self)
src/models.py:98
Method
validation_epoch_end
(self, outputs)
src/models.py:338
Method
validation_step
(self, batch, batch_idx)
src/models.py:326
Method
white_space_fix
(text)
src/models.py:235