smallpond.execution.executor.Executor#
- class smallpond.execution.executor.Executor(ctx: RuntimeContext, id: str, wq: WorkQueue, cq: WorkQueue)#
The task executor.
- __init__(ctx: RuntimeContext, id: str, wq: WorkQueue, cq: WorkQueue) None #
Methods
__init__
(ctx, id, wq, cq)acquire_gpu
(quota)Acquire GPU resources with the given quota.
collect_finished_works
()create
(ctx, id)exec_loop
(pool)process_work
(item, cq)release_gpu
(gpus)Release GPU resources to the pool.
run
()skip_probes
(epochs)stop
()Attributes
available_gpu_quota
busy
local_gpus
{ GPU: available_quota }