chemprop.featurizers.molgraph.cache#
Classes#
A |
|
A |
|
A |
Module Contents#
- class chemprop.featurizers.molgraph.cache.MolGraphCacheFacade(inputs, V_fs, E_fs, featurizer)[source]#
Bases:
collections.abc.Sequence[chemprop.data.molgraph.MolGraph],Generic[chemprop.featurizers.base.S]A
MolGraphCacheFacadeprovided an interface for cachingMolGraphs.Note
This class only provides a facade for a cached dataset, but it does not guarantee whether the underlying data is truly cached.
- Parameters:
inputs (Iterable[S]) – The inputs to be featurized.
V_fs (Iterable[np.ndarray]) – The node features for each input.
E_fs (Iterable[np.ndarray]) – The edge features for each input.
featurizer (Featurizer[S, MolGraph]) – The featurizer with which to generate the
MolGraphs.
- class chemprop.featurizers.molgraph.cache.MolGraphCache(inputs, V_fs, E_fs, featurizer, n_workers=0)[source]#
Bases:
MolGraphCacheFacadeA
MolGraphCacheprecomputes the correspondingMolGraphs and caches them in memory.- Parameters:
inputs (Iterable[chemprop.featurizers.base.S])
V_fs (Iterable[numpy.ndarray | None])
E_fs (Iterable[numpy.ndarray | None])
featurizer (chemprop.featurizers.base.Featurizer[chemprop.featurizers.base.S, chemprop.data.molgraph.MolGraph])
n_workers (int)
- class chemprop.featurizers.molgraph.cache.MolGraphCacheOnTheFly(inputs, V_fs, E_fs, featurizer)[source]#
Bases:
MolGraphCacheFacadeA
MolGraphCacheOnTheFlycomputes the correspondingMolGraphs as they are requested.- Parameters:
inputs (Iterable[chemprop.featurizers.base.S])
V_fs (Iterable[numpy.ndarray | None])
E_fs (Iterable[numpy.ndarray | None])
featurizer (chemprop.featurizers.base.Featurizer[chemprop.featurizers.base.S, chemprop.data.molgraph.MolGraph])