schrodinger.application.livedesign_ml.ldml_utils module¶
Utility functions for LiveDesign ML (LDML) operations.
This module provides higher-level convenience functions that build on top of
the LDMLClient API, such as polling for job completion.
- schrodinger.application.livedesign_ml.ldml_utils.poll_ldml_job(get_status: Callable[[str], LDMLJobStatus], job_id: str, polling_interval: int = 600, max_retries: int = 5, logger: logging.Logger | None = None) LDMLJobStatus¶
Poll an LDML job until completion or failure.
Sleeps for
polling_intervalseconds between each status check. On a successful status fetch the retry counter resets to zero. On a transientLDMLClientErrororLDMLApiErrorthe counter increments; if it reachesmax_retriesanLDMLClientErroris raised.- Parameters:
get_status – Callable that accepts a job ID and returns the current
LDMLJobStatus.job_id – The LDML job ID to poll.
polling_interval – Seconds between status polls.
max_retries – Max consecutive polling errors before failure.
logger – Logger instance to use. Defaults to this module’s logger.
- Returns:
Final job status.
- Raises:
LDMLClientError – If max retries exceeded.
- schrodinger.application.livedesign_ml.ldml_utils.poll_retrosynth_job(client: LDMLClient, job_id: str, project_name: str, polling_interval: int = 600, max_retries: int = 5, logger: logging.Logger | None = None) LDMLJobStatus¶
Poll a retrosynthesis job until completion or failure.
- Parameters:
client – An
LDMLClientinstance.job_id – The LDML job ID to poll.
project_name – RetroSynthesis project name.
polling_interval – Seconds between status polls.
max_retries – Max consecutive polling errors before failure.
logger – Logger instance to use. Defaults to this module’s logger.
- Returns:
Final job status.
- Raises:
LDMLClientError – If max retries exceeded.