From a95d3ba19ed5058ad24ab29f9ead04e57c33ace2 Mon Sep 17 00:00:00 2001 From: Smartappli <26173534+Smartappli@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:45:53 +0000 Subject: [PATCH] :art: Format Python code with psf/black --- fl_common/models/hiera.py | 4 ++-- fl_common/models/segmentation/snp.py | 12 +++++++++--- fl_server/tests/tests_server.py | 9 +++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/fl_common/models/hiera.py b/fl_common/models/hiera.py index 8b524e7a..de6027f7 100644 --- a/fl_common/models/hiera.py +++ b/fl_common/models/hiera.py @@ -22,8 +22,8 @@ def get_hiera_model(hiera_type, num_classes): "hiera_base_plus_224", "hiera_large_224", "hiera_huge_224", - 'hiera_small_abswin_256', - 'hiera_base_abswin_256', + "hiera_small_abswin_256", + "hiera_base_abswin_256", } if hiera_type not in valid_hiera_types: diff --git a/fl_common/models/segmentation/snp.py b/fl_common/models/segmentation/snp.py index e5431775..72f093ce 100644 --- a/fl_common/models/segmentation/snp.py +++ b/fl_common/models/segmentation/snp.py @@ -577,10 +577,16 @@ def test_model_combinations(encoders, architectures): in_channels=3, classes=2, ) - preprocess_input = get_preprocessing_fn(encoder["model"], pretrained='imagenet') - print(f'Success: Created {arch["model"]} with {encoder["model"]}') + preprocess_input = get_preprocessing_fn( + encoder["model"], pretrained="imagenet" + ) + print( + f'Success: Created {arch["model"]} with {encoder["model"]}' + ) except Exception as e: - print(f'Failed: {arch["model"]} with {encoder["model"]} - {e}') + print( + f'Failed: {arch["model"]} with {encoder["model"]} - {e}' + ) test_model_combinations(encoders, architectures) diff --git a/fl_server/tests/tests_server.py b/fl_server/tests/tests_server.py index b07d3c74..f22ba308 100644 --- a/fl_server/tests/tests_server.py +++ b/fl_server/tests/tests_server.py @@ -76,10 +76,11 @@ def test_launch_node_main(self): ) self.client_humani.upload_dataset(dataset) - ds_client = login('node_humani', - "janedoe@caltech.edu", - "abc123", - ) + ds_client = login( + "node_humani", + "janedoe@caltech.edu", + "abc123", + ) asset = ds_client.datasets[-1].assets["ages"] mock = asset.mock