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

Fingerprints break for new version of scikit-fingerprints #446

Closed
AVHopp opened this issue Dec 9, 2024 · 3 comments
Closed

Fingerprints break for new version of scikit-fingerprints #446

AVHopp opened this issue Dec 9, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@AVHopp
Copy link
Collaborator

AVHopp commented Dec 9, 2024

With the newest version 1.12.0 of scikit-fingerprints, our code breaks. This can be seen when e.g. running the Basics/campaign example which fails when having package version 1.12.0 but works for 1.11.0.

m290244@deda1x5085:~/baybe> python examples/Basics/campaign.py 
Traceback (most recent call last):
  File "/home-cdo/m290244/baybe/examples/Basics/campaign.py", line 60, in <module>
    searchspace = SearchSpace.from_product(parameters=parameters)
  File "/home-cdo/m290244/baybe/baybe/searchspace/core.py", line 145, in from_product
    discrete = SubspaceDiscrete.from_product(
  File "/home-cdo/m290244/baybe/baybe/searchspace/discrete.py", line 253, in from_product
    return SubspaceDiscrete(
  File "<attrs generated init baybe.searchspace.discrete.SubspaceDiscrete>", line 14, in __init__
    _setattr('comp_rep', __attr_factory_comp_rep(self))
  File "/home-cdo/m290244/baybe/baybe/searchspace/discrete.py", line 166, in _default_comp_rep
    comp_rep = self.transform(self.exp_rep)
  File "/home-cdo/m290244/baybe/baybe/searchspace/discrete.py", line 688, in transform
    comp_df = param.transform(df[param.name])
  File "/home-cdo/m290244/baybe/baybe/parameters/base.py", line 142, in transform
    right=self.comp_df,
  File "/home-cdo/m290244/miniforge3/envs/baybe310/lib/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/home-cdo/m290244/baybe/baybe/parameters/substance.py", line 135, in comp_df
    comp_df = chemistry.smiles_to_fingerprint_features(
  File "/home-cdo/m290244/baybe/baybe/utils/chemistry.py", line 152, in smiles_to_fingerprint_features
    col_names = [
  File "/home-cdo/m290244/baybe/baybe/utils/chemistry.py", line 153, in <listcomp>
    prefix + name + f.split("fingerprint")[1]
IndexError: list index out of range

Explicitly pinging @Hrovatin here as she created this feature. Will create a hotfix PR pinning the version for now.

@fabianliebig
Copy link
Collaborator

fabianliebig commented Dec 9, 2024

I could reproduce that error in a freshly installed environment as well.

@Scienfitz
Copy link
Collaborator

Note that I implemented the passthrough of explicit descriptor names in .get_feature_names_out() into skfp for mordred and rdkit2ddescriptors which should be part of the new release
Not sure if related to the issue but was a point of discussion before

@AVHopp AVHopp self-assigned this Dec 9, 2024
@Scienfitz Scienfitz added the bug Something isn't working label Dec 11, 2024
AVHopp added a commit that referenced this issue Dec 13, 2024
Fix for #446 by introducing a robust check for different potential
formats for feature names.
@AVHopp
Copy link
Collaborator Author

AVHopp commented Dec 13, 2024

Resolved by #447 .

@AVHopp AVHopp closed this as completed Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants