nvflare.apis.job_scheduler_spec module
- class DispatchInfo(app_name: str, resource_requirements: dict, token: str | None)[source]
Bases:
objectInformation needed for dispatch
- class JobSchedulerSpec[source]
Bases:
ABC- abstract schedule_job(job_manager: JobDefManagerSpec, job_candidates: list[Job], fl_ctx: FLContext)[source]
Try to schedule a Job.
- Parameters:
job_manager – JobDefManager
job_candidates – The candidate to choose from.
fl_ctx – FLContext.
- Returns:
job is the Job that satisfies the criteria of the scheduler. sites_dispatch_info is dict of {site name: DispatchInfo} for the job.
- Return type:
A tuple of (job, sites_dispatch_info, failed_jobs, blocked_jobs)