← Về thư mục
openai4s/orchestration/local/backend.py
- _fsync_directory · function · L185-L190 — def _fsync_directory(path: Path) -> None
- _acknowledgement_path · function · L193-L194 — def _acknowledgement_path(receipt_path: Path) -> Path
- _atomic_write_json · function · L197-L215 — def _atomic_write_json(path: Path, value: dict[str, Any]) -> None
- _receipt_lock · function · L219-L233 — def _receipt_lock(path: Path) -> Iterator[None]
- _identity_is_held · function · L236-L255 — def _identity_is_held(path: Path | None) -> bool
- _AdoptedProcess · class · L258-L297 — class _AdoptedProcess
- init · method · L261-L269 — def init( self, pid: int, identity_path: Path | None, uncertain_pgid: int | None = None, ) -> None
- poll · method · L271-L286 — def poll(self) -> int | None
- wait · method · L288-L294 — def wait(self, timeout: float | None = None) -> int
- send_signal · method · L296-L297 — def send_signal(self, sig: int) -> None
- _LocalJob · class · L301-L324 — class _LocalJob
- LocalBackend · class · L327-L1284 — class LocalBackend
- init · method · L332-L354 — def init( self, *, log_dir: Path | str | None = None, max_concurrent: int = MAX_CONCURRENT, clock: Any = time.monotonic, ) -> None
- _receipt_path · method · L358-L361 — def _receipt_path(self, allocation_id: str) -> Path
- _identity_path · method · L363-L366 — def _identity_path(self, allocation_id: str) -> Path
- _read_receipt · method · L369-L394 — def _read_receipt(path: Path) -> dict[str, Any]
- _write_receipt · method · L396-L399 — def _write_receipt(self, path: Path, value: dict[str, Any]) -> None
- _validate_receipt_paths · method · L401-L441 — def _validate_receipt_paths(self, path: Path, receipt: dict[str, Any]) -> None
- _validate_launch_receipt · method · L443-L464 — def _validate_launch_receipt( self, path: Path, receipt: dict[str, Any], *, allocation_id: str, token: str, pid: int, pgid: int | None, identity_path: Path, ) -> None
- _unlink_if_present · method · L467-L471 — def _unlink_if_present(path: Path) -> None
- _remove_unarmed_receipt · method · L473-L483 — def _remove_unarmed_receipt(self, path: Path, receipt: dict[str, Any]) -> None
- _complete_acknowledgement · method · L485-L516 — def _complete_acknowledgement(self, ack_path: Path) -> None
- _sweep_orphan_sidecars · method · L518-L555 — def _sweep_orphan_sidecars(self) -> None
- _adopt_receipt · method · L557-L602 — def _adopt_receipt(self, path: Path, receipt: dict[str, Any]) -> None
- _recover_unarmed_receipt · method · L604-L632 — def _recover_unarmed_receipt(self, path: Path) -> None
- _load_receipts · method · L634-L663 — def _load_receipts(self) -> None
- _wait_for_running_receipt · method · L665-L679 — def _wait_for_running_receipt( self, path: Path, process: subprocess.Popen ) -> dict[str, Any] | None
- _live_count · method · L683-L689 — def _live_count(self) -> int
- _poll_job · method · L692-L725 — def _poll_job(job: _LocalJob) -> tuple[int | None, bool]
- submit · method · L727-L1002 — def submit( self, *, allocation: Allocation, spec: WorkloadSpec, profile: ResourceProfile, ) -> SubmitResult
- _child_env · method · L1004-L1030 — def _child_env(self, spec: WorkloadSpec) -> dict[str, str]
- observe · method · L1034-L1106 — def observe(self, allocation: Allocation) -> Observation
- cancel · method · L1110-L1143 — def cancel(self, allocation: Allocation, *, reason: Reason) -> None
- find_by_token · method · L1145-L1154 — def find_by_token(self, token: SubmissionToken) -> ExternalHandle | None
- terminal_acknowledgement_candidates · method · L1156-L1160 — def terminal_acknowledgement_candidates(self) -> tuple[str, ...]
- acknowledge_terminal · method · L1162-L1218 — def acknowledge_terminal(self, allocation: Allocation) -> None
- diagnostics · method · L1220-L1230 — def diagnostics(self) -> dict[str, Any]
- log_paths · method · L1232-L1250 — def log_paths(self, allocation_id: str) -> tuple[Path | None, Path | None]
- close · method · L1252-L1276 — def close(self) -> None
- _handle · method · L1280-L1284 — def _handle(self, allocation_id: str) -> ExternalHandle