Skip to content

Commit 7f22f83

Browse files
committed
Merge branch 'dev' into code_documentation
2 parents 376cda2 + c8252b5 commit 7f22f83

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

chebai/preprocessing/datasets/pubchem.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import requests
1818
import torch
1919
import tqdm
20+
from datetime import datetime
2021

2122
from chebai.preprocessing import reader as dr
2223
from chebai.preprocessing.datasets.base import DataLoader, XYBaseDataModule
@@ -35,7 +36,9 @@ class PubChem(XYBaseDataModule):
3536

3637
def __init__(self, *args, k=100000, **kwargs):
3738
self._k = k
38-
self.pubchem_url = "https://ftp.ncbi.nlm.nih.gov/pubchem/Compound/Monthly/2023-11-01/Extras/CID-SMILES.gz"
39+
current_year = datetime.today().year
40+
current_month = datetime.today().month
41+
self.pubchem_url = f"https://ftp.ncbi.nlm.nih.gov/pubchem/Compound/Monthly/{current_year}-{current_month:02d}-01/Extras/CID-SMILES.gz"
3942

4043
super(PubChem, self).__init__(*args, **kwargs)
4144

configs/training/pretraining_callbacks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
- class_path: chebai.trainer.InnerCVTrainer.ModelCheckpointCVSupport
1+
- class_path: chebai.callbacks.model_checkpoint.CustomModelCheckpoint
22
init_args:
33
monitor: val_loss
44
mode: 'min'
55
filename: 'best_{epoch}_{val_loss:.4f}'
66
every_n_epochs: 1
77
save_top_k: 5
8-
- class_path: chebai.trainer.InnerCVTrainer.ModelCheckpointCVSupport
8+
- class_path: chebai.callbacks.model_checkpoint.CustomModelCheckpoint
99
init_args:
1010
filename: 'per_{epoch}_{val_loss:.4f}'
1111
every_n_epochs: 5

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
author_email="martin.glauer@ovgu.de",
1515
description="",
1616
zip_safe=False,
17+
python_requires="<=3.11.8",
1718
install_requires=[
1819
"certifi",
1920
"idna",
@@ -45,6 +46,7 @@
4546
"seaborn",
4647
"deepsmiles",
4748
"iterative-stratification",
49+
"wandb",
4850
],
4951
extras_require={"dev": ["black", "isort", "pre-commit"]},
5052
)

0 commit comments

Comments
 (0)