Runners#

The hastegeo.core.runners package provides task execution backends for running compute-intensive operations (training, inference, imagery preprocessing) on remote infrastructure.

Supported Backends#

Backend

Class

Description

Azure Batch

AzureBatchRunner

GPU-enabled task execution via Azure Batch pools

Unified Runner (hastegeo.core.runners.unified_runner)#

Factory wrapper that instantiates the correct runner based on configuration.

class hastegeo.core.runners.unified_runner.UnifiedRunner(runner_type, config=None, **kwargs)[source]#

Bases: object

__init__(runner_type, config=None, **kwargs)[source]#
add_task(job_id, task_id, **kwargs)[source]#
cancel_task(job_id, task_id)[source]#
cleanup_task(job_id, task_id)[source]#
get_filecontent_from_task(job_id, task_id, filename, as_chunk=False)[source]#
get_task_status(job_id, task_id)[source]#

Abstract Base (hastegeo.core.runners.base)#

Defines the interface all runner implementations must follow.

Abstract methods: get_filecontent_from_task(), get_task_status(), add_task(), cleanup_task(), cancel_task()

class hastegeo.core.runners.base.BaseRunner(config=None)[source]#

Bases: ABC

__init__(config=None)[source]#
abstract add_task(job_id, task_id, **kwargs)[source]#
abstract cancel_task(job_id, task_id)[source]#
abstract cleanup_task(job_id, task_id)[source]#
abstract get_filecontent_from_task(job_id, task_id, filename, as_chunk=False)[source]#
abstract get_task_status(job_id, task_id)[source]#

Azure Batch Runner (hastegeo.core.runners.azure_batch)#

Executes tasks on Azure Batch GPU pools using Docker container images (pulled from Azure Container Registry).

  • AzureBatchRunner — High-level runner implementing the base interface

  • AzureBatchJob — Low-level Azure Batch job and task management