Skip to content

Commit f16550c

Browse files
committed
fix utils imports
1 parent 1986a31 commit f16550c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

chebai/result/utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
import importlib
12
import os
23
import shutil
3-
from typing import Optional, Tuple, Union
4+
from pathlib import Path
5+
from typing import Optional, Tuple
46

57
import torch
68
import tqdm
79
import wandb
810
import wandb.util as wandb_util
11+
import yaml
912

1013
from chebai.models.base import ChebaiBaseNet
11-
from chebai.models.electra import Electra
1214
from chebai.preprocessing.datasets.base import XYBaseDataModule
1315
from chebai.preprocessing.datasets.chebi import _ChEBIDataExtractor
1416

@@ -121,7 +123,7 @@ def evaluate_model(
121123
save_batch_size = 128
122124
n_saved = 1
123125

124-
print(f"")
126+
print("")
125127
for i in tqdm.tqdm(range(0, len(data_list), batch_size)):
126128
if not (
127129
skip_existing_preds
@@ -307,5 +309,5 @@ def parse_config_file(config_path: str) -> tuple[str, dict]:
307309
)
308310
os.makedirs(buffer_dir_concat, exist_ok=True)
309311
preds, labels = load_results_from_buffer(buffer_dir, "cpu")
310-
torch.save(preds, os.path.join(buffer_dir_concat, f"preds000.pt"))
311-
torch.save(labels, os.path.join(buffer_dir_concat, f"labels000.pt"))
312+
torch.save(preds, os.path.join(buffer_dir_concat, "preds000.pt"))
313+
torch.save(labels, os.path.join(buffer_dir_concat, "labels000.pt"))

0 commit comments

Comments
 (0)