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

Cleanup tests #487

Merged
merged 5 commits into from
Jun 17, 2020
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ benchmark_xyz
*.pyc
*checkpoint*
*.pt
/runs
/tests/runs
/quicktest.py
/*.ipt
/*.params
Expand All @@ -39,3 +39,5 @@ dist
Untitled.ipynb
/nnp_training.py
/test*.py
.coverage
htmlcov/
1 change: 0 additions & 1 deletion tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
dataset_path = os.path.join(path, '../dataset/ani-1x/sample.h5')
batch_size = 256
ani1x = torchani.models.ANI1x()
consts = ani1x.consts
sae_dict = ani1x.sae_dict
aev_computer = ani1x.aev_computer

Expand Down
2 changes: 1 addition & 1 deletion tests/test_neurochem.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestNeuroChem(unittest.TestCase):

def testNeuroChemTrainer(self):
d = torch.device('cpu')
trainer = torchani.neurochem.Trainer(iptpath, d, True, 'runs')
trainer = torchani.neurochem.Trainer(iptpath, d, True, os.path.join(path, 'runs'))

# test if loader construct correct model
self.assertEqual(trainer.aev_computer.aev_length, 384)
Expand Down
1 change: 1 addition & 0 deletions tests/test_vibrational.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def testVibrationalWavenumbers(self):
modes = []
for j in range(6, 6 + len(freq)):
modes.append(vib.get_mode(j))
vib.clean()
modes = torch.tensor(modes)
# compute vibrational by torchani
species = model.species_to_tensor(molecule.get_chemical_symbols()).unsqueeze(0)
Expand Down