← Về thư mục
skills/retrosynthesis_planning/reaction_model_backends.py
- _json_copy · function · L59-L63 — def _json_copy(value: Any, *, field: str) -> Any
- _text · function · L66-L69 — def _text(value: Any, *, field: str) -> str
- _normalize_response · function · L72-L156 — def _normalize_response( value: Any, *, request_id: str, manifest: ModelManifest ) -> dict[str, Any]
- ReactionModelBackend · class · L159-L353 — class ReactionModelBackend
- init · method · L162-L215 — def init( self, model: str, *, manifest: ModelManifest | Mapping[str, Any] | str | Path, python_command: Iterable[str] | None = None, worker_path: str | Path | None = None, model_location: str | Path | None = None, repository_dir: str | Path | None = None, timeout_seconds: float = 600.0, env: Mapping[str, str] | None = None, allow_quarantined: bool = False, ) -> None
- run · method · L217-L279 — def run(self, operation: str, inputs: Any, **options: Any) -> dict[str, Any]
- capabilities · method · L281-L282 — def capabilities(self) -> dict[str, Any]
- map_reactions · method · L284-L287 — def map_reactions( self, reactions: list[dict[str, str]], *, batch_size: int = 32 ) -> dict[str, Any]
- plan_routes · method · L289-L307 — def plan_routes( self, targets: list[dict[str, str]], *, config_path: str, policies: Iterable[str] = (), filters: Iterable[str] = (), stocks: Iterable[str] = (), max_routes: int = 10, ) -> dict[str, Any]
- predict_products · method · L309-L323 — def predict_products( self, records: list[dict[str, str]], *, top_k: int = 5, max_new_tokens: int = 128, device: str = "cpu", ) -> dict[str, Any]
- predict_yields · method · L325-L337 — def predict_yields( self, records: list[dict[str, str]], *, input_max_length: int = 400, device: str = "cpu", ) -> dict[str, Any]
- recommend_conditions · method · L339-L353 — def recommend_conditions( self, reactions: list[dict[str, str]], *, config_path: str, workspace_dir: str, gpu: int = -1, ) -> dict[str, Any]