calypso.dispatchers.orchestrator.machine module
- class calypso.dispatchers.orchestrator.machine.Machine(machine_data: MachineData)
Bases:
object
- as_dict()
- is_accessible()
Machine is accessible if the number of running jobs is less than the max number of tasks.
- serialize(to_file=True)
saving machine dictionary into file if to_file is true, else return a dict.
- submit_task(job: Job | list[Job] | None = None)
submit job to given machine, if job state is unsubmitted, return the state of submitted job.
- update_job_state()
Query each job state with Scheduler or set unsubmitted. Results will be saved into self.job_state.
- class calypso.dispatchers.orchestrator.machine.MachineData(executor: str, scheduler: str, scheduler_env: list[str] = <factory>, name: str = 'Machine', host: str | None = None, port: int | None = None, username: str | None = None, password: str | None = None, key_filename: str | None = None, numb_cpu_per_node: int | None = None, numb_node: int | None = None, remote_root: str | None = None, command: str | None = None, external_command: str | None = None, max_run_time: str | int = '1:00:00', machine_capacity: int = 1, max_retry: int = 5, group_size: int = 1, envs: list[str] = <factory>, additional_head_setting: list[str] = <factory>, queue: str | None = None, kwargs: dict = <factory>)
Bases:
object
- classmethod from_kwargs(**kwargs: dict)
ref: https://stackoverflow.com/questions/55099243/python3-dataclass-with-kwargsasterisk
- as_dict()