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

V2: Add all notebooks to test #840

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

hwpang
Copy link
Contributor

@hwpang hwpang commented Apr 24, 2024

Description

Currently when a notebook test fails, CI doesn't complain. I will work on debugging this in this PR.

Example / Current workflow

n/a

Bugfix / Desired workflow

n/a

Questions

n/a

Relevant issues

#798

Checklist

  • linted with flake8?
  • (if appropriate) unit tests added?

@hwpang hwpang added this to the v2.0.1 milestone Apr 24, 2024
@hwpang hwpang linked an issue Apr 24, 2024 that may be closed by this pull request
@shihchengli
Copy link
Contributor

Is there any update for this PR? I looked at the test results, and it seems this CI would work. There are two notebooks that failed to run. One seems due to an outdated import, and the other one failed because of a matplotlib import error. Can you install this package in the CI when running the tests on those examples? We can wait for #834 to be merged and run the tests again.

@hwpang hwpang changed the title V2: Make CI complain when notebook tests fail V2: Add all notebooks to test May 23, 2024
@hwpang
Copy link
Contributor Author

hwpang commented May 23, 2024

With the -v verbose tag, I was able to make the notebook test fails CI. After adding all the notebooks to CI, there are some bugs found.

mpnn_fingerprints notebook is now failing as it uses matplotlib, but chemprop env doesn't come with matplotlib. @shihchengli What do you think we should do? Should we add matplotlib to chemprop env? Or should we remove the plotting examples?

extra_features_from_featurizer notebook is also now failing due to cannot import name 'MoleculeFeaturizer' from 'chemprop.featurizers' error. I assumed that it intends to import SimpleMoleculeMolGraphFeaturizer, so I changed that. However, after fixing that, now the notebook fails with the following error during initialization of the MorganFingerprintMoleculeFeaturizer. @kevingreenman @KnathanM do you two know how to fix this?

mf = MorganFingerprintMoleculeFeaturizer()
morgan = mf(utils.make_mol(smis[0], keep_h=False, add_h=False))
morgan.shape, morgan
>>>
TypeError                                 Traceback (most recent call last)
Cell In[8], [line 1](vscode-notebook-cell:?execution_count=8&line=1)
----> [1](vscode-notebook-cell:?execution_count=8&line=1) mf = MorganFingerprintMoleculeFeaturizer()
      [2](vscode-notebook-cell:?execution_count=8&line=2) morgan = mf(utils.make_mol(smis[0], keep_h=False, add_h=False))
      [3](vscode-notebook-cell:?execution_count=8&line=3) morgan.shape, morgan

File <string>:6, in __init__(self, atom_featurizer, bond_featurizer, extra_atom_fdim, extra_bond_fdim, fp_size)

TypeError: MorganFingerprintMoleculeFeaturizer.__post_init__() takes 1 positional argument but 3 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: CI doesn't complain when notebooks fail
2 participants