dacapo.blockwise.relabel_worker

Attributes

fit

read_write_conflict

path

Functions

cli(log_level)

CLI for running the relabel worker.

start_worker(output_container, output_dataset, tmpdir)

start_worker_fn(output_container, output_dataset, tmpdir)

Start the relabel worker.

relabel_in_block(array_out, old_values, new_values, block)

Relabel the array in the given block.

find_components(nodes, edges)

Find the components.

read_cross_block_merges(tmpdir)

Read the cross block merges.

spawn_worker(output_array_identifier, tmpdir)

Spawn a worker to predict on a given dataset.

Module Contents

dacapo.blockwise.relabel_worker.cli(log_level)

CLI for running the relabel worker.

Parameters:

log_level (str) – The log level to use.

dacapo.blockwise.relabel_worker.fit = 'shrink'
dacapo.blockwise.relabel_worker.read_write_conflict = False
dacapo.blockwise.relabel_worker.path
dacapo.blockwise.relabel_worker.start_worker(output_container, output_dataset, tmpdir, return_io_loop=False)
dacapo.blockwise.relabel_worker.start_worker_fn(output_container, output_dataset, tmpdir, return_io_loop=False)

Start the relabel worker.

Parameters:
  • output_container (str) – The output container

  • output_dataset (str) – The output dataset

  • tmpdir (str) – The temporary directory

dacapo.blockwise.relabel_worker.relabel_in_block(array_out, old_values, new_values, block)

Relabel the array in the given block.

Parameters:
  • array_out (np.ndarray) – The output array

  • old_values (np.ndarray) – The old values

  • new_values (np.ndarray) – The new values

  • block (daisy.Block) – The block

dacapo.blockwise.relabel_worker.find_components(nodes, edges)

Find the components.

Parameters:
  • nodes (np.ndarray) – The nodes

  • edges (np.ndarray) – The edges

Returns:

The components

Return type:

List[int]

dacapo.blockwise.relabel_worker.read_cross_block_merges(tmpdir)

Read the cross block merges.

Parameters:

tmpdir (str) – The temporary directory

Returns:

The nodes and edges

Return type:

Tuple[np.ndarray, np.ndarray]

dacapo.blockwise.relabel_worker.spawn_worker(output_array_identifier: dacapo.store.array_store.LocalArrayIdentifier, tmpdir: str)

Spawn a worker to predict on a given dataset.

Parameters:
  • output_array_identifier (LocalArrayIdentifier) – The output array identifier

  • tmpdir (str) – The temporary directory

Returns:

The function to run the worker

Return type:

Callable