You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error when using splito with rdkit=2024.3.4. nBits is not an argument for rdFingerprintGenerator.GetMorganGenerator, however it is used as the default argument for initalizingGetMorganGenerator here:
train_idx, test_idx = next(splitter.split(X=keys))
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/sklearn/model_selection/_split.py", line 1841, in split
for train, test in self._iter_indices(X, y, groups):
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/splito/_distance_split_base.py", line 125, in _iter_indices
X, self._metric = convert_to_default_feats_if_smiles(X, self._metric, n_jobs=self._n_jobs)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/splito/_distance_split_base.py", line 51, in convert_to_default_feats_if_smiles
X = dm.utils.parallelized(_to_feats, X, n_jobs=n_jobs)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/utils/jobs.py", line 256, in parallelized
return runner(fn, inputs_list, arg_type=arg_type)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/utils/jobs.py", line 158, in __call__
return self.sequential(*args, **kwargs)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/utils/jobs.py", line 113, in sequential
results = [
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/utils/jobs.py", line 114, in <listcomp>
JobRunner.wrap_fn(callable_fn, arg_type, **fn_kwargs)(dt)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/utils/jobs.py", line 83, in _run
return fn(args, **fn_kwargs)
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/splito/_distance_split_base.py", line 45, in _to_feats
feats = dm.to_fp(
File "/home/rileyparsons/Function/venv/lib/python3.10/site-packages/datamol/fp.py", line 288, in to_fp
fp_func = fp_func(**fp_args)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdFingerprintGenerator.GetMorganGenerator()
did not match C++ signature:
GetMorganGenerator(unsigned int radius=3, bool countSimulation=False, bool includeChirality=False, bool useBondTypes=True, bool onlyNonzeroInvariants=False, bool includeRingMembership=True, boost::python::api::object {lvalue} countBounds=None, unsigned int fpSize=2048, boost::python::api::object {lvalue} atomInvariantsGenerator=None, boost::python::api::object {lvalue} bondInvariantsGenerator=None, bool includeRedundantEnvironments=False
The text was updated successfully, but these errors were encountered:
It seems this was caused by datamol-io/datamol#226, where datamol switched from using GetMorganFingerprintAsBitVect to GetMorganGenerator. We should indeed update nBits to fpSize and set a minimum version for datamol.
There is an error when using splito with
rdkit=2024.3.4
.nBits
is not an argument forrdFingerprintGenerator.GetMorganGenerator
, however it is used as the default argument for initalizingGetMorganGenerator
here:splito/splito/_distance_split_base.py
Line 16 in 654e427
The documentation for RDKit has
fpSize
instead. This might have changed in the new version - we should probably updatenBits
tofpSize
.Here is the full stacktrace:
The text was updated successfully, but these errors were encountered: