← Về thư mục
skills/retrosynthesis_planning/external_backends.py
- _scrub_paths · function · L53-L62 — def _scrub_paths(text: str) -> str
- BackendProtocolError · class · L65-L66 — class BackendProtocolError(ValueError)
- BackendExecutionError · class · L69-L74 — class BackendExecutionError(RuntimeError)
- init · method · L72-L74 — def init(self, code: str, message: str) -> None
- _clean_text · function · L77-L87 — def _clean_text(value: Any, *, field_name: str, max_length: int = 500) -> str
- _optional_text · function · L90-L93 — def _optional_text(value: Any, *, field_name: str, max_length: int = 500) -> str | None
- _json_copy · function · L96-L100 — def _json_copy(value: Any, *, field_name: str) -> Any
- _finite_number · function · L103-L111 — def _finite_number(value: Any, *, field_name: str) -> float | None
- _normalize_sha256 · function · L114-L120 — def _normalize_sha256(value: Any, *, field_name: str) -> str | None
- _normalize_source_url · function · L123-L130 — def _normalize_source_url(value: Any) -> str | None
- ModelManifest · class · L134-L279 — class ModelManifest
- post_init · method · L149-L180 — def post_init(self) -> None
- from_mapping · method · L183-L227 — def from_mapping(cls, value: Mapping[str, Any]) -> "ModelManifest"
- from_json_file · method · L230-L236 — def from_json_file(cls, path: str | Path) -> "ModelManifest"
- provenance_status · method · L239-L257 — def provenance_status(self) -> str
- to_dict · method · L259-L272 — def to_dict(self) -> dict[str, Any]
- fingerprint · method · L275-L279 — def fingerprint(self) -> str
- load_model_manifest · function · L282-L294 — def load_model_manifest( value: ModelManifest | Mapping[str, Any] | str | Path | None, ) -> ModelManifest | None
- _normalize_error · function · L297-L315 — def _normalize_error(value: Any) -> dict[str, Any]
- _normalize_prediction · function · L318-L358 — def _normalize_prediction(value: Any, *, index: int) -> dict[str, Any]
- normalize_external_backend_response · function · L361-L471 — def normalize_external_backend_response( value: Any, *, expected_request_id: str | None = None ) -> dict[str, Any]
- SubprocessRetrosynthesisBackend · class · L474-L568 — class SubprocessRetrosynthesisBackend
- init · method · L477-L509 — def init( self, command: Iterable[str], *, timeout_seconds: float = DEFAULT_TIMEOUT_SECONDS, max_response_bytes: int = DEFAULT_MAX_RESPONSE_BYTES, env: Mapping[str, str] | None = None, ) -> None
- run · method · L511-L568 — def run(self, payload: Mapping[str, Any]) -> dict[str, Any]
- SyntheseusBackend · class · L571-L678 — class SyntheseusBackend
- init · method · L577-L621 — def init( self, *, model: str = "RetroChimera", model_dir: str | Path | None = None, manifest: ModelManifest | Mapping[str, Any] | str | Path | None = None, allow_model_download: bool = False, python_command: Iterable[str] | None = None, worker_path: str | Path | None = None, timeout_seconds: float = DEFAULT_TIMEOUT_SECONDS, env: Mapping[str, str] | None = None, ) -> None
- capabilities · method · L623-L631 — def capabilities(self, *, request_id: str | None = None) -> dict[str, Any]
- single_step · method · L633-L678 — def single_step( self, target_smiles: str, *, num_results: int = 5, request_id: str | None = None, ) -> dict[str, Any]