Skip to content

Commit

Permalink
finalize test
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w-feldmann committed Nov 20, 2024
1 parent e279563 commit 8cfc27c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test_extras/test_chemprop/test_chemprop_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ def test_prediction(self) -> None:
self.assertTrue(np.allclose(pred, pred_copy))

# Test single prediction, this was causing an error before
_ = regression_model.predict([molecule_net_logd_df["smiles"].iloc[0]])
single_mol_pred = regression_model.predict([molecule_net_logd_df["smiles"].iloc[0]])
self.assertEqual(single_mol_pred.shape, (1,))


class TestClassificationPipeline(unittest.TestCase):
Expand Down Expand Up @@ -345,7 +346,10 @@ def test_prediction(self) -> None:
self.assertTrue(np.allclose(proba[~nan_indices], proba_copy[~nan_indices]))

# Test single prediction, this was causing an error before
_ = classification_model.predict([molecule_net_bbbp_df["smiles"].iloc[0]])
single_mol_pred = classification_model.predict([molecule_net_bbbp_df["smiles"].iloc[0]])
self.assertEqual(single_mol_pred.shape, (1,))
single_mol_proba = classification_model.predict_proba([molecule_net_bbbp_df["smiles"].iloc[0]])
self.assertEqual(single_mol_proba.shape, (1, 2))


class TestMulticlassClassificationPipeline(unittest.TestCase):
Expand Down

0 comments on commit 8cfc27c

Please sign in to comment.