Skip to content

Commit 968141e

Browse files
committed
Ensure compatibility with older python versions
1 parent 3259491 commit 968141e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chebai/preprocessing/datasets/tox21.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def setup_processed(self):
217217
test_smiles = dict(reversed(row.strip().split("\t")) for row in fin)
218218
with open(os.path.join(self.raw_dir, f"test_results.txt")) as fin:
219219
headers = next(fin).strip().split("\t")
220-
test_results = {k["Sample ID"]:[int(k[h]) if k[h] != "x" else None for h in self.HEADERS] for k in (dict(zip(headers, row.strip().split("\t"), strict=True)) for row in fin if row)}
220+
test_results = {k["Sample ID"]:[int(k[h]) if k[h] != "x" else None for h in self.HEADERS] for k in (dict(zip(headers, row.strip().split("\t"))) for row in fin if row)}
221221
test_data = [self.reader.to_data(dict(features=test_smiles[k], labels=test_results[k], ident=k)) for k in test_smiles]
222222
torch.save(test_data, os.path.join(self.processed_dir, f"test.pt"))
223223

0 commit comments

Comments
 (0)