Skip to content

Commit

Permalink
debug-flag fix (#97)
Browse files Browse the repository at this point in the history
* debug-flag fix

* move debug test to cons test
  • Loading branch information
mshuaibii authored May 23, 2021
1 parent 2c9fff9 commit 173b966
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion amptorch/tests/consistency_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_energy_force_consistency():
"scaling": {"type": "normalize", "range": (-1, 1)},
},
"cmd": {
"debug": False,
"debug": True,
"run_dir": "./",
"seed": 1,
"identifier": "test",
Expand Down
2 changes: 1 addition & 1 deletion amptorch/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ def load_dataset(self):
self.target_scaler = self.train_dataset.target_scaler
self.input_dim = self.train_dataset.input_dim
self.val_split = self.config["dataset"].get("val_split", 0)
self.config["dataset"]["descriptor"] = descriptor_setup
if not self.debug:
normalizers = {
"target": self.target_scaler,
"feature": self.feature_scaler,
}
torch.save(normalizers, os.path.join(self.cp_dir, "normalizers.pt"))
# clean/organize config
self.config["dataset"]["descriptor"] = descriptor_setup
self.config["dataset"]["fp_length"] = self.input_dim
torch.save(self.config, os.path.join(self.cp_dir, "config.pt"))
print("Loading dataset: {} images".format(len(self.train_dataset)))
Expand Down

0 comments on commit 173b966

Please sign in to comment.