Skip to content

Commit

Permalink
Merge pull request #195 from chemprop/bugfix_tap
Browse files Browse the repository at this point in the history
bugfix for training within git repo
  • Loading branch information
cjmcgill committed Aug 4, 2021
2 parents d67d88e + 33c7254 commit 3f20ca4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions chemprop/train/cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import sys
from typing import Callable, Dict, List, Tuple

import subprocess
import numpy as np
import pandas as pd

Expand Down Expand Up @@ -54,7 +54,11 @@ def cross_validate(args: TrainArgs,

# Save args
makedirs(args.save_dir)
args.save(os.path.join(args.save_dir, 'args.json'))
try:
args.save(os.path.join(args.save_dir, 'args.json'))
except subprocess.CalledProcessError:
debug('Could not write the reproducibility section of the arguments to file, thus omitting this section.')
args.save(os.path.join(args.save_dir, 'args.json'), with_reproducibility=False)

#set explicit H option and reaction option
set_explicit_h(args.explicit_h)
Expand Down

0 comments on commit 3f20ca4

Please sign in to comment.