Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean out unneeded dependencies #7

Merged
merged 8 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ MAINTAINER ersilia

RUN pip install rdkit
RUN pip install git+https://github.com/bp-kelley/descriptastorus
RUN pip install tqdm>=4.62.2
RUN pip install typed-argument-parser==1.6.1
RUN pip install scikit-learn
RUN pip install torch
RUN pip install pandas
RUN pip install tensorboardX==2.0
RUN pip install scipy>=1.4.1
RUN pip install hyperopt
RUN pip install protobuf==3.18.3
Expand Down
16 changes: 8 additions & 8 deletions model/framework/code/chemprop/train/run_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import warnings
warnings.filterwarnings("ignore", category=np.VisibleDeprecationWarning)
import pandas as pd
from tensorboardX import SummaryWriter
#from tensorboardX import SummaryWriter
import torch
from tqdm import trange
from torch.optim.lr_scheduler import ExponentialLR
Expand Down Expand Up @@ -243,13 +243,13 @@ def run_training(args: TrainArgs,

# Train ensemble of models
for model_idx in range(args.ensemble_size):
# Tensorboard writer
save_dir = os.path.join(args.save_dir, f'model_{model_idx}')
makedirs(save_dir)
try:
writer = SummaryWriter(log_dir=save_dir)
except:
writer = SummaryWriter(logdir=save_dir)
# # Tensorboard writer
# save_dir = os.path.join(args.save_dir, f'model_{model_idx}')
# makedirs(save_dir)
# try:
# writer = SummaryWriter(log_dir=save_dir)
# except:
# writer = SummaryWriter(logdir=save_dir)

# Load/build model
if args.checkpoint_paths is not None:
Expand Down
4 changes: 2 additions & 2 deletions model/framework/code/chemprop/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Callable

import numpy as np
from tensorboardX import SummaryWriter
#from tensorboardX import SummaryWriter
import torch
import torch.nn as nn
from torch.optim import Optimizer
Expand All @@ -25,7 +25,7 @@ def train(
n_iter: int = 0,
atom_bond_scaler: AtomBondScaler = None,
logger: logging.Logger = None,
writer: SummaryWriter = None,
#writer: SummaryWriter = None,
) -> int:
"""
Trains a model for an epoch.
Expand Down