KeivanR commited on
Commit
8df5d3b
·
1 Parent(s): a2fd1a6

model to device in eval

Browse files
Files changed (1) hide show
  1. qwen_classifier/evaluate.py +1 -0
qwen_classifier/evaluate.py CHANGED
@@ -140,6 +140,7 @@ def _evaluate_local(test_data_path, hf_repo):
140
  with torch.no_grad():
141
  for batch in dataloader:
142
  print(f"EVALUATION RUNNING ON {global_model.device}")
 
143
  batch = {k: v.to(DEVICE) for k, v in batch.items()}
144
  labels = batch["labels"].type(torch.float32)
145
 
 
140
  with torch.no_grad():
141
  for batch in dataloader:
142
  print(f"EVALUATION RUNNING ON {global_model.device}")
143
+ global_model = global_model.to(DEVICE)
144
  batch = {k: v.to(DEVICE) for k, v in batch.items()}
145
  labels = batch["labels"].type(torch.float32)
146