|
14 | 14 |
|
15 | 15 | from uuid import uuid4
|
16 | 16 |
|
17 |
| -import numpy as np |
18 | 17 | from joblib import Parallel, delayed
|
19 | 18 | from loguru import logger
|
20 | 19 | from rdkit import Chem
|
@@ -205,11 +204,6 @@ def set_params(self, **parameters: Any) -> Self:
|
205 | 204 | setattr(self, att_name, att_value)
|
206 | 205 | return self
|
207 | 206 |
|
208 |
| - @property |
209 |
| - def additional_attributes(self) -> dict[str, Any]: |
210 |
| - """Any attribute relevant for recreating and exact copy, which is not a parameter.""" |
211 |
| - return {} |
212 |
| - |
213 | 207 | @property
|
214 | 208 | def n_jobs(self) -> int:
|
215 | 209 | """Get the number of cores."""
|
@@ -571,29 +565,6 @@ def transform(self, values: Any) -> Any:
|
571 | 565 | self.finish()
|
572 | 566 | return output
|
573 | 567 |
|
574 |
| - def to_json(self) -> dict[str, Any]: |
575 |
| - """Return all defining attributes of object as dict. |
576 |
| -
|
577 |
| - Returns |
578 |
| - ------- |
579 |
| - dict[str, Any] |
580 |
| - A dictionary with all attributes necessary to initialize a object with same parameters. |
581 |
| - """ |
582 |
| - json_dict: dict[str, Any] = { |
583 |
| - "__name__": self.__class__.__name__, |
584 |
| - "__module__": self.__class__.__module__, |
585 |
| - } |
586 |
| - json_dict.update(self.parameters) |
587 |
| - if self.additional_attributes: |
588 |
| - adittional_attributes = {} |
589 |
| - for key, value in self.additional_attributes.items(): |
590 |
| - if isinstance(value, np.ndarray): |
591 |
| - adittional_attributes[key] = value.tolist() |
592 |
| - else: |
593 |
| - adittional_attributes[key] = value |
594 |
| - json_dict["additional_attributes"] = adittional_attributes |
595 |
| - return json_dict |
596 |
| - |
597 | 568 |
|
598 | 569 | class MolToMolPipelineElement(TransformingPipelineElement, abc.ABC):
|
599 | 570 | """Abstract PipelineElement where input and outputs are molecules."""
|
|
0 commit comments