nerdd-module 0.3.6__tar.gz → 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/PKG-INFO +1 -1
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/model.py +3 -6
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/simple_model.py +2 -7
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module.egg-info/PKG-INFO +1 -1
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/pyproject.toml +1 -1
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/LICENSE +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/README.md +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/cli.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/default_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/dict_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/merged_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/package_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/search_yaml_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/config/yaml_configuration.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/converters/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/converters/converter.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/converters/identity_converter.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/depth_first_explorer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/explorer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/file_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/gzip_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/inchi_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/list_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/mol_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/sdf_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/smiles_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/string_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/tar_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/input/zip_reader.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/assign_mol_id_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/assign_name_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/convert_representations_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/enforce_schema_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/read_input_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/write_output_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/csv_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/file_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/iterator_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/pandas_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/record_list_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/sdf_writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/output/writer.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/polyfills/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/polyfills/files.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/polyfills/get_entry_points.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/polyfills/types.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/polyfills/version.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/check_valid_smiles.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/chembl_structure_pipeline.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/filter_by_element.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/filter_by_weight.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/preprocessing_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/remove_stereochemistry.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/sanitize.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/problem.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/py.typed +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/steps/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/steps/map_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/steps/output_step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/steps/step.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/checks.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/models/AtomicMassModel.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/models/MolWeightModel.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/models/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/predictions.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/preprocessing/DummyPreprocessingStep.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/representations.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/util/__init__.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/util/call_with_mappings.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/util/package.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/version.py +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module.egg-info/SOURCES.txt +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module.egg-info/dependency_links.txt +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module.egg-info/requires.txt +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module.egg-info/top_level.txt +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/setup.cfg +0 -0
- {nerdd_module-0.3.6 → nerdd_module-0.3.7}/tests/test_features.py +0 -0
|
@@ -49,10 +49,6 @@ class Model(ABC):
|
|
|
49
49
|
def _get_postprocessing_steps(self, output_format: Optional[str], **kwargs: Any) -> List[Step]:
|
|
50
50
|
pass
|
|
51
51
|
|
|
52
|
-
@abstractmethod
|
|
53
|
-
def _get_output_step(self, output_format: Optional[str], **kwargs: Any) -> OutputStep:
|
|
54
|
-
pass
|
|
55
|
-
|
|
56
52
|
def predict(
|
|
57
53
|
self,
|
|
58
54
|
input: Any,
|
|
@@ -63,14 +59,15 @@ class Model(ABC):
|
|
|
63
59
|
input_steps = self._get_input_steps(input, input_format, **kwargs)
|
|
64
60
|
preprocessing_steps = self._get_preprocessing_steps(input, input_format, **kwargs)
|
|
65
61
|
postprocessing_steps = self._get_postprocessing_steps(output_format, **kwargs)
|
|
66
|
-
output_step =
|
|
62
|
+
output_step = postprocessing_steps[-1]
|
|
63
|
+
|
|
64
|
+
assert isinstance(output_step, OutputStep), "The last step must be an OutputStep."
|
|
67
65
|
|
|
68
66
|
steps = [
|
|
69
67
|
*input_steps,
|
|
70
68
|
*preprocessing_steps,
|
|
71
69
|
PredictionStep(self, batch_size=self.batch_size, **kwargs),
|
|
72
70
|
*postprocessing_steps,
|
|
73
|
-
output_step,
|
|
74
71
|
]
|
|
75
72
|
|
|
76
73
|
# build the pipeline from the list of steps
|
|
@@ -14,7 +14,7 @@ from ..config import (
|
|
|
14
14
|
from ..input import DepthFirstExplorer
|
|
15
15
|
from ..preprocessing import PreprocessingStep
|
|
16
16
|
from ..problem import Problem
|
|
17
|
-
from ..steps import
|
|
17
|
+
from ..steps import Step
|
|
18
18
|
from ..util import get_file_path_to_instance
|
|
19
19
|
from .assign_mol_id_step import AssignMolIdStep
|
|
20
20
|
from .assign_name_step import AssignNameStep
|
|
@@ -66,12 +66,9 @@ class SimpleModel(Model):
|
|
|
66
66
|
ConvertRepresentationsStep(
|
|
67
67
|
self.get_config().get("result_properties", []), output_format, **kwargs
|
|
68
68
|
),
|
|
69
|
+
WriteOutputStep(output_format, **kwargs),
|
|
69
70
|
]
|
|
70
71
|
|
|
71
|
-
def _get_output_step(self, output_format: Optional[str], **kwargs: Any) -> OutputStep:
|
|
72
|
-
output_format = output_format or "pandas"
|
|
73
|
-
return WriteOutputStep(output_format, **kwargs)
|
|
74
|
-
|
|
75
72
|
def _preprocess(self, mol: Mol) -> Tuple[Optional[Mol], List[Problem]]:
|
|
76
73
|
return mol, []
|
|
77
74
|
|
|
@@ -129,9 +126,7 @@ class SimpleModel(Model):
|
|
|
129
126
|
{"name": "source"},
|
|
130
127
|
{"name": "name", "type": "string"},
|
|
131
128
|
{"name": "input_mol", "type": "mol"},
|
|
132
|
-
{"name": "input_smiles", "type": "string"},
|
|
133
129
|
{"name": "preprocessed_mol", "type": "mol"},
|
|
134
|
-
{"name": "preprocessed_smiles", "type": "string"},
|
|
135
130
|
]
|
|
136
131
|
|
|
137
132
|
default_properties_end = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/model/convert_representations_step.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/chembl_structure_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/preprocessing/remove_stereochemistry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.6 → nerdd_module-0.3.7}/nerdd_module/tests/preprocessing/DummyPreprocessingStep.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|