Skip to content

Commit

Permalink
Clean up tqdm progress bars during training
Browse files Browse the repository at this point in the history
  • Loading branch information
swansonk14 committed Aug 25, 2020
1 parent 76e9b68 commit ae38722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chemprop/train/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def predict(model: MoleculeModel,

preds = []

for batch in tqdm(data_loader, disable=disable_progress_bar):
for batch in tqdm(data_loader, disable=disable_progress_bar, leave=False):
# Prepare batch
batch: MoleculeDataset
mol_batch, features_batch = batch.batch_graph(), batch.features()
Expand Down
2 changes: 1 addition & 1 deletion chemprop/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def train(model: MoleculeModel,
model.train()
loss_sum, iter_count = 0, 0

for batch in tqdm(data_loader, total=len(data_loader)):
for batch in tqdm(data_loader, total=len(data_loader), leave=False):
# Prepare batch
batch: MoleculeDataset
mol_batch, features_batch, target_batch = batch.batch_graph(), batch.features(), batch.targets()
Expand Down

0 comments on commit ae38722

Please sign in to comment.