Skip to content

Commit

Permalink
Format Python code with psf/black push (#341)
Browse files Browse the repository at this point in the history
There appear to be some python formatting errors in
fde6af2. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix
these issues.
  • Loading branch information
mzouink authored Nov 14, 2024
2 parents 200ff20 + 1abb3fd commit ec4b5d3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
21 changes: 10 additions & 11 deletions tests/fixtures/architectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,19 @@ def unet_architecture():
)



@pytest.fixture()
def unet_3d_architecture():
yield CNNectomeUNetConfig(
name="tmp_unet_3d_architecture",
input_shape=(188, 188, 188),
eval_shape_increase=(72, 72, 72),
fmaps_in=1,
num_fmaps=6,
fmaps_out=6,
fmap_inc_factor=2,
downsample_factors=[(2, 2, 2), (2, 2, 2), (2, 2, 2)],
constant_upsample=True,
)
name="tmp_unet_3d_architecture",
input_shape=(188, 188, 188),
eval_shape_increase=(72, 72, 72),
fmaps_in=1,
num_fmaps=6,
fmaps_out=6,
fmap_inc_factor=2,
downsample_factors=[(2, 2, 2), (2, 2, 2), (2, 2, 2)],
constant_upsample=True,
)


def unet_architecture_builder(batch_norm, upsample, use_attention, three_d):
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def onehot_task():
classes=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l"],
)


@pytest.fixture()
def six_onehot_task():
yield OneHotTaskConfig(
name="one_hot_task",
classes=["a", "b", "c", "d", "e", "f"],
)
)
4 changes: 3 additions & 1 deletion tests/operations/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def test_validate_run(
@pytest.mark.parametrize("datasplit", [lf("six_class_datasplit")])
@pytest.mark.parametrize("task", [lf("distance_task"), lf("six_onehot_task")])
@pytest.mark.parametrize("trainer", [lf("gunpowder_trainer")])
@pytest.mark.parametrize("architecture", [lf("unet_architecture"), lf("unet_3d_architecture")])
@pytest.mark.parametrize(
"architecture", [lf("unet_architecture"), lf("unet_3d_architecture")]
)
def test_validate_unet(datasplit, task, trainer, architecture):
store = create_config_store()
weights_store = create_weights_store()
Expand Down

0 comments on commit ec4b5d3

Please sign in to comment.