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

debug-flag fix #97

Merged
merged 2 commits into from
May 23, 2021
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: 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