Skip to content

TilePipeline

Pipeline that fetches and processes tiles

Implements the Pipeline protocol.

PARAMETER DESCRIPTION
grid

Grid

TYPE: Grid

tile_fetcher

Tile fetcher

TYPE: TileFetcher

tiles_processor

Tiles processor

TYPE: TilesProcessor

tile_loader_batch_size

Batch size

TYPE: int DEFAULT: 1

tile_loader_max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

tile_loader_num_prefetched_tiles

Number of prefetched tiles

TYPE: int DEFAULT: 0

show_progress

If True, show the progress in a progress bar

TYPE: bool DEFAULT: True

from_config classmethod

Creates a tile pipeline from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: TilePipelineConfig

RETURNS DESCRIPTION
TilePipeline

Tile pipeline

__call__

Runs the tile pipeline.


TilePipelineConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of TilePipeline

Create the configuration from a config file
  • Use null instead of None
  • Use false or true instead of False or True
Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'TilePipeline'
config:
  plugins_dir_path: null
  show_progress: true

  grid_config:
    ...

  tile_fetcher_config:
    ...

  tile_loader_config:
    batch_size: 1
    max_num_threads: null
    num_prefetched_tiles: 0

  tiles_processor_config:
    ...
ATTRIBUTE DESCRIPTION
plugins_dir_path

Path to the plugins directory - defaults to None

TYPE: Path | None

show_progress

If True, show the progress in a progress bar - defaults to True

TYPE: bool

grid_config

Configuration for the grid

TYPE: GridConfig

tile_fetcher_config

Configuration for the tile fetcher

TYPE: TileFetcherConfig

tile_loader_config

Configuration for the tile loader - defaults to TileLoaderConfig

TYPE: TileLoaderConfig

tiles_processor_config

Configuration for the tiles processor

TYPE: TilesProcessorConfig


TileLoaderConfig

Bases: pydantic.BaseModel

Configuration for the tile loader in the tile pipeline

Create the configuration from a config file
  • Use null instead of None
Example

You can create the configuration from a config file.

config.yaml
batch_size: 1
max_num_threads: null
num_prefetched_tiles: 0
ATTRIBUTE DESCRIPTION
batch_size

Batch size - defaults to 1

TYPE: int

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None

num_prefetched_tiles

Number of prefetched tiles - defaults to 0

TYPE: int