Spaces:
Running
on
Zero
Running
on
Zero
feiyang-cai
commited on
Commit
·
43da3de
1
Parent(s):
8a703f0
update
Browse files
utils.py
CHANGED
@@ -251,6 +251,7 @@ class MolecularPropertyPredictionModel():
|
|
251 |
|
252 |
self.base_model.set_adapter(adapter_name)
|
253 |
self.base_model.eval()
|
|
|
254 |
|
255 |
#if adapter_name not in self.apapter_scaler_path:
|
256 |
# self.apapter_scaler_path[adapter_name] = hf_hub_download(adapter_id, filename="scaler.pkl", token = os.environ.get("TOKEN"))
|
@@ -287,7 +288,7 @@ class MolecularPropertyPredictionModel():
|
|
287 |
print(self.base_model.device)
|
288 |
print(batch)
|
289 |
outputs = self.base_model(**batch)
|
290 |
-
print(
|
291 |
if task_type == "regression": # TODO: check if the model is regression or classification
|
292 |
y_pred.append(outputs.logits.cpu().detach().numpy())
|
293 |
else:
|
|
|
251 |
|
252 |
self.base_model.set_adapter(adapter_name)
|
253 |
self.base_model.eval()
|
254 |
+
self.base_model.to('cuda')
|
255 |
|
256 |
#if adapter_name not in self.apapter_scaler_path:
|
257 |
# self.apapter_scaler_path[adapter_name] = hf_hub_download(adapter_id, filename="scaler.pkl", token = os.environ.get("TOKEN"))
|
|
|
288 |
print(self.base_model.device)
|
289 |
print(batch)
|
290 |
outputs = self.base_model(**batch)
|
291 |
+
print(outputs)
|
292 |
if task_type == "regression": # TODO: check if the model is regression or classification
|
293 |
y_pred.append(outputs.logits.cpu().detach().numpy())
|
294 |
else:
|