dacapo.blockwise.segment_worker

Attributes

logger

fit

read_write_conflict

path

Functions

cli(log_level)

CLI for running the segment worker.

start_worker(input_container, input_dataset, ...[, ...])

start_worker_fn(input_container, input_dataset, ...[, ...])

Start a worker to run a segment function on a given dataset.

spawn_worker(input_array_identifier, ...)

Spawn a worker to predict on a given dataset.

Module Contents

dacapo.blockwise.segment_worker.logger
dacapo.blockwise.segment_worker.cli(log_level)

CLI for running the segment worker.

Parameters:

log_level (str) – The log level to use.

dacapo.blockwise.segment_worker.fit = 'shrink'
dacapo.blockwise.segment_worker.read_write_conflict = True
dacapo.blockwise.segment_worker.path
dacapo.blockwise.segment_worker.start_worker(input_container: str | upath.UPath, input_dataset: str, output_container: str | upath.UPath, output_dataset: str, tmpdir: str | upath.UPath, function_path: str | upath.UPath, return_io_loop: bool = False)
dacapo.blockwise.segment_worker.start_worker_fn(input_container: str | upath.UPath, input_dataset: str, output_container: str | upath.UPath, output_dataset: str, tmpdir: str | upath.UPath, function_path: str | upath.UPath, return_io_loop: bool = False)

Start a worker to run a segment function on a given dataset.

Parameters:
  • input_container (str) – The input container.

  • input_dataset (str) – The input dataset.

  • output_container (str) – The output container.

  • output_dataset (str) – The output dataset.

  • tmpdir (str) – The temporary directory.

  • function_path (str) – The path to the segment function.

  • return_io_loop (bool) – Whether to return the io loop or run it.

dacapo.blockwise.segment_worker.spawn_worker(input_array_identifier: dacapo.store.array_store.LocalArrayIdentifier, output_array_identifier: dacapo.store.array_store.LocalArrayIdentifier, tmpdir: str, function_path: str)

Spawn a worker to predict on a given dataset.

Parameters:
  • model (Model) – The model to use for prediction.

  • raw_array (Array) – The raw data to predict on.

  • prediction_array_identifier (LocalArrayIdentifier) – The identifier of the prediction array.

Returns:

The function to run the worker.

Return type:

Callable