Skip to content

Commit

Permalink
minor changes, add logs to gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
MenuaB committed Mar 21, 2024
1 parent a89682a commit c6a7058
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions chemlactica/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,14 @@ def remove_extraneous_args(args):
def get_model_train_config(train_config_name):
model_config = ModelConfig()
train_config = TrainConfig()
root_path = "/".join(os.path.abspath(__file__).split("/")[:-2])
path = f"{root_path}/config/config_yamls/{train_config_name}_config.yaml"
with open(path, "r") as infile:
config_path = os.path.join(
os.path.dirname(__file__),
"..",
"config",
"config_yamls",
f"{train_config_name}_config.yaml",
)
with open(config_path, "r") as infile:
custom_config = yaml.full_load(infile)
for k, v in custom_config["model_config"].items():
model_config.k = v
Expand Down
2 changes: 1 addition & 1 deletion confirm_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def run_unit_tests():
os.environ["CUDA_VISIBLE_DEVICES"] = gpus
print(f"NOTE: Using GPU(s) '{gpus}' for testing.")
loader = unittest.TestLoader()
tests = loader.discover("tests", pattern="test_env.py")
tests = loader.discover("tests", pattern="test_*.py")
testRunner = unittest.runner.TextTestRunner(verbosity=2)
test_results = testRunner.run(tests)
if (
Expand Down

0 comments on commit c6a7058

Please sign in to comment.