Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/allenai/naacl2021-longdoc-tutorial
/ functions
Functions
17 in github.com/allenai/naacl2021-longdoc-tutorial
⨍
Functions
17
◇
Types & classes
2
↓ 3 callers
Method
_get_dataloader
Get training and validation dataloaders
summarization.py:111
↓ 2 callers
Method
_evaluation_step
Validaton or Testing - predict output, compare it with gold, compute rouge1, 2, L, and log result
summarization.py:129
↓ 2 callers
Method
_set_global_attention_mask
Configure the global attention pattern based on the task
summarization.py:64
↓ 1 callers
Method
add_model_specific_args
(parser)
summarization.py:156
↓ 1 callers
Method
forward
Call LEDForConditionalGeneration.forward
summarization.py:89
Method
__getitem__
Gets an example from the dataset. The input and output are tokenized and limited to a certain seqlen.
summarization.py:24
Method
__init__
(self, hf_arxiv_dataset, tokenizer, args)
summarization.py:15
Method
__init__
Loads the model, the tokenizer and the metric.
summarization.py:49
Method
__len__
Returns length of the dataset
summarization.py:20
Method
collate_fn
Groups multiple examples into one batch with padding and tensorization. The collate function is called by PyTorch DataLoader
summarization.py:34
Method
configure_optimizers
Configure the optimizer and the learning rate scheduler
summarization.py:101
Method
test_dataloader
(self)
summarization.py:126
Method
test_step
(self, batch, batch_nb)
summarization.py:152
Method
train_dataloader
(self)
summarization.py:120
Method
training_step
Call the forward pass then return loss
summarization.py:96
Method
val_dataloader
(self)
summarization.py:123
Method
validation_step
(self, batch, batch_nb)
summarization.py:149