← Về thư mục
skills/retrosynthesis_planning/single_step_benchmark.py
- SingleStepProtocolError · class · L34-L35 — class SingleStepProtocolError(ValueError)
- ChemistryDependencyError · class · L38-L39 — class ChemistryDependencyError(RuntimeError)
- rdkit_canonicalize · function · L42-L69 — def rdkit_canonicalize(smiles: str) -> str
- _text · function · L72-L75 — def _text(value: Any, *, field: str) -> str
- _json_copy · function · L78-L82 — def _json_copy(value: Any, *, field: str) -> Any
- _score · function · L85-L93 — def _score(value: Any) -> float | None
- _top_k · function · L96-L101 — def _top_k(value: Any) -> int
- _signature · function · L104-L105 — def _signature(components: Sequence[str]) -> str
- normalize_precursor_set · function · L108-L122 — def normalize_precursor_set( value: Any, *, canonicalizer: Canonicalizer = rdkit_canonicalize ) -> tuple[str, ...]
- PublicTarget · class · L126-L133 — class PublicTarget
- to_dict · method · L132-L133 — def to_dict(self) -> dict[str, str]
- validate_public_targets · function · L136-L185 — def validate_public_targets( rows: Iterable[Mapping[str, Any]], *, canonicalizer: Canonicalizer = rdkit_canonicalize, ) -> tuple[PublicTarget, ...]
- NormalizedPrediction · class · L189-L213 — class NormalizedPrediction
- to_dict · method · L202-L213 — def to_dict(self) -> dict[str, Any]
- TargetPredictions · class · L217-L231 — class TargetPredictions
- to_dict · method · L225-L231 — def to_dict(self) -> dict[str, Any]
- normalize_target_predictions · function · L234-L327 — def normalize_target_predictions( target: PublicTarget, predictions: Iterable[Mapping[str, Any]], *, top_k: int, canonicalizer: Canonicalizer = rdkit_canonicalize, backend_error: Any = None, ) -> TargetPredictions
- normalize_prediction_payloads · function · L330-L380 — def normalize_prediction_payloads( targets: Sequence[PublicTarget], payloads: Iterable[Mapping[str, Any]], *, top_k: int, canonicalizer: Canonicalizer = rdkit_canonicalize, ) -> tuple[TargetPredictions, ...]
- normalize_references · function · L383-L414 — def normalize_references( targets: Sequence[PublicTarget], rows: Iterable[Mapping[str, Any]], *, canonicalizer: Canonicalizer = rdkit_canonicalize, ) -> dict[str, frozenset[str]]
- _component_multiset_distance · function · L417-L423 — def _component_multiset_distance(left: str, right: str) -> float
- _mean_pairwise_component_distance · function · L426-L434 — def _mean_pairwise_component_distance(signatures: Sequence[str]) -> float | None
- evaluate_predictions · function · L437-L562 — def evaluate_predictions( predictions: Sequence[TargetPredictions], references: Mapping[str, frozenset[str]], *, top_k: int, ) -> dict[str, Any]
- build_intermediate_results · function · L565-L599 — def build_intermediate_results( targets: Sequence[PublicTarget], predictions: Sequence[TargetPredictions], *, top_k: int, input_hashes: Mapping[str, str] | None = None, model_manifest: Mapping[str, Any] | None = None, random_seed: int = 2026, ) -> dict[str, Any]
- sha256_file · function · L602-L607 — def sha256_file(path: str | Path) -> str
- load_targets_csv · function · L610-L615 — def load_targets_csv(path: str | Path) -> list[dict[str, Any]]
- load_jsonl · function · L618-L635 — def load_jsonl(path: str | Path) -> list[dict[str, Any]]
- _write_json_atomic · function · L638-L654 — def _write_json_atomic(path: str | Path, payload: Mapping[str, Any]) -> None
- _load_manifest · function · L657-L664 — def _load_manifest(path: str | None) -> dict[str, Any]
- main · function · L667-L723 — def main( argv: Sequence[str] | None = None, *, canonicalizer: Canonicalizer = rdkit_canonicalize, ) -> int