kernelfoundry.eval_pipeline.tasks.task_runner¶
Task execution dispatcher for managing kernel compilation and testing jobs.
Provides the TaskRunner class which coordinates task execution either locally or via Celery queue, handling build and test steps with optional containerization.
Classes
Task execution manager and dispatcher. |
- class kernelfoundry.eval_pipeline.tasks.task_runner.TaskRunner[source]¶
Task execution manager and dispatcher.
- app = None¶
- classmethod build_custom_task(task: Task) Task[source]¶
Builds the custom task if it has a build step.
- classmethod build_image(task: Task) dict[str, dict[str, BuildResult]][source]¶
Builds a container image for the custom task.
- Parameters:
task (Task) – The custom task whose environment image should be built.
- Returns:
{gpu_arch: BuildResult}} where BuildResult.result.output_data contains ‘image_id’ on success.
- Return type:
dict of format {language
- Raises:
RuntimeError – If the image build fails.
- classmethod pull_image(image_id: str, registry: str | None, allowed_container_registries: list[str] | None, queue: str, timeout: int = 3600) tuple[str | None, str, ProcessResult][source]¶
Pulls a container image on a worker.
- Parameters:
image_id – The image ID or fully-qualified image name to pull.
registry – The container registry to use for pulling the image.
queue – The queue to submit the pull task to.
timeout – The maximum time in seconds to wait for the pull to complete.
- Returns:
A tuple of (image_id or None on failure, worker hostname, ProcessResult).
- classmethod test_custom_task(task: Task, gpu_arch: str | None = None) dict[str, TestResult][source]¶
Executes the custom task.