Update evaluation.py
Browse files- evaluation.py +0 -2
evaluation.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import evaluate
|
| 2 |
import torch
|
| 3 |
from enum import Enum
|
| 4 |
-
from scripts.gputils import print_gpu_utilization, clear_gpu_mem
|
| 5 |
from tqdm import tqdm
|
| 6 |
|
| 7 |
|
|
@@ -28,7 +27,6 @@ def classify_assertions_in_sentences(sentences, model, tokenizer, batch_size=32)
|
|
| 28 |
outputs = model(**batch)
|
| 29 |
predicted_labels = torch.argmax(outputs.logits, dim=1)
|
| 30 |
predictions.append(predicted_labels)
|
| 31 |
-
print_gpu_utilization()
|
| 32 |
return torch.cat(predictions)
|
| 33 |
|
| 34 |
|
|
|
|
| 1 |
import evaluate
|
| 2 |
import torch
|
| 3 |
from enum import Enum
|
|
|
|
| 4 |
from tqdm import tqdm
|
| 5 |
|
| 6 |
|
|
|
|
| 27 |
outputs = model(**batch)
|
| 28 |
predicted_labels = torch.argmax(outputs.logits, dim=1)
|
| 29 |
predictions.append(predicted_labels)
|
|
|
|
| 30 |
return torch.cat(predictions)
|
| 31 |
|
| 32 |
|