Update tasks/text.py
Browse files- tasks/text.py +2 -1
tasks/text.py
CHANGED
@@ -5,6 +5,7 @@ from sklearn.metrics import accuracy_score
|
|
5 |
import random
|
6 |
import numpy as np
|
7 |
from huggingface_hub import PyTorchModelHubMixin
|
|
|
8 |
|
9 |
import torch
|
10 |
import torch.nn as nn
|
@@ -106,7 +107,7 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
106 |
test_dataloader = DataLoader(test_data, sampler=test_sampler, batch_size=batch_size)
|
107 |
|
108 |
predictions = []
|
109 |
-
for
|
110 |
|
111 |
|
112 |
b_input_ids, b_input_mask, b_token_type_ids = batch
|
|
|
5 |
import random
|
6 |
import numpy as np
|
7 |
from huggingface_hub import PyTorchModelHubMixin
|
8 |
+
from tqdm import tqdm, trange
|
9 |
|
10 |
import torch
|
11 |
import torch.nn as nn
|
|
|
107 |
test_dataloader = DataLoader(test_data, sampler=test_sampler, batch_size=batch_size)
|
108 |
|
109 |
predictions = []
|
110 |
+
for batch in tqdm(test_dataloader):
|
111 |
|
112 |
|
113 |
b_input_ids, b_input_mask, b_token_type_ids = batch
|