Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Python code with psf/black push #263

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions dacapo/blockwise/predict_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def cli(log_level):
)
@click.option("-od", "--output_dataset", required=True, type=str)
def start_worker(
run_name: str| Run,
run_name: str | Run,
iteration: int | None,
input_container: Path | str,
input_dataset: str,
Expand All @@ -87,19 +87,17 @@ def start_worker(
output_dataset=output_dataset,
return_io_loop=return_io_loop,
)



def start_worker_fn(
run_name: str| Run,
run_name: str | Run,
iteration: int | None,
input_container: Path | str,
input_dataset: str,
output_container: Path | str,
output_dataset: str,
return_io_loop: bool,
):

"""
Start a worker to apply a trained model to a dataset.

Expand All @@ -115,7 +113,7 @@ def start_worker_fn(
device = compute_context.device

# retrieving run
logger.error(f"run_name: {run_name} {type(run_name)}" )
logger.error(f"run_name: {run_name} {type(run_name)}")
if isinstance(run_name, Run):
run = run_name
run_name = run.name
Expand Down Expand Up @@ -234,7 +232,7 @@ def io_loop():


def spawn_worker(
run_name: str| Run,
run_name: str | Run,
iteration: int | None,
input_array_identifier: "LocalArrayIdentifier",
output_array_identifier: "LocalArrayIdentifier",
Expand All @@ -253,10 +251,10 @@ def spawn_worker(
compute_context = create_compute_context()
if not compute_context.distribute_workers:
return start_worker_fn(
run_name= run_name,
run_name=run_name,
iteration=iteration,
input_container= input_array_identifier.container,
input_dataset= input_array_identifier.dataset,
input_container=input_array_identifier.container,
input_dataset=input_array_identifier.dataset,
output_container=output_array_identifier.container,
output_dataset=output_array_identifier.dataset,
return_io_loop=True,
Expand Down