Skip to content

Commit cb657c2

Browse files
committed
Merge branch 'tagdataset/add-llm-exp-pred' of github.com:xnuohz/pytorch_geometric into tagdataset/add-llm-exp-pred
2 parents fda21c2 + ac7bfed commit cb657c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torch_geometric/datasets/molecule_gpt_dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ def extract_one_SDF_file(block_id: int) -> None:
371371
writer.write(mol)
372372
valid_mol_count += 1
373373

374+
writer.close()
374375
print(f"block id: {block_id}\nfound {valid_mol_count}\n\n")
375376
sys.stdout.flush()
376377
return
@@ -410,6 +411,7 @@ def extract_one_SDF_file(block_id: int) -> None:
410411
print(f"block id: {block_id} with 0 valid SDF file")
411412
continue
412413

414+
writer.close()
413415
print(f"In total: {len(found_CID_set)} molecules")
414416

415417
# Step 05. Convert to PyG data format

0 commit comments

Comments
 (0)