Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
args: [--line-length=128, --extend-exclude=.ipynb, --exclude=/build|dist/, --verbose]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
args: [--max-line-length=128, '--exclude=./.*,build,dist', '--ignore=E501,W503,E203,F841,E402,E231,E226,E228', --count, --statistics, --show-source]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args: [--profile=black, --line-length=128]
3 changes: 1 addition & 2 deletions fl_sim/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from . import algorithms, compressors, data_processing, models, nodes, optimizers, regularizers, utils
from .version import __version__
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from . import ( # noqa: F401
apfl,
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/_misc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

server_config_kw_doc = """
- ``log_dir`` : str or pathlib.Path, optional
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/_register.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import re
import warnings
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/apfl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._apfl import APFLClient, APFLClientConfig, APFLServer, APFLServerConfig
from .test_apfl import test_apfl
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/apfl/_apfl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/apfl/test_apfl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/ditto/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._ditto import DittoClient, DittoClientConfig, DittoServer, DittoServerConfig
from .test_ditto import test_ditto
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/ditto/_ditto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/ditto/test_ditto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/feddr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._feddr import FedDRClient, FedDRClientConfig, FedDRServer, FedDRServerConfig
from .test_feddr import test_feddr
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/feddr/_feddr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/feddr/test_feddr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/feddyn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._feddyn import FedDynClient, FedDynClientConfig, FedDynServer, FedDynServerConfig
from .test_feddyn import test_feddyn
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/feddyn/test_feddyn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedopt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._fedopt import (
FedAdagradClient,
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedopt/_fedopt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedopt/test_fedopt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedpd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._fedpd import FedPDClient, FedPDClientConfig, FedPDServer, FedPDServerConfig
from .test_fedpd import test_fedpd
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedpd/test_fedpd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedprox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._fedprox import FedProxClient, FedProxClientConfig, FedProxServer, FedProxServerConfig
from .test_fedprox import test_fedprox
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedprox/test_fedprox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedsplit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._fedsplit import FedSplitClient, FedSplitClientConfig, FedSplitServer, FedSplitServerConfig
from .test_fedsplit import test_fedsplit
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedsplit/_fedsplit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/fedsplit/test_fedsplit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/ifca/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._ifca import IFCAClient, IFCAClientConfig, IFCAServer, IFCAServerConfig
from .test_ifca import test_ifca
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/ifca/test_ifca.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/pfedmac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._pfedmac import pFedMacClient, pFedMacClientConfig, pFedMacServer, pFedMacServerConfig
from .test_pfedmac import test_pfedmac
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/pfedmac/_pfedmac.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/pfedmac/test_pfedmac.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/pfedme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._pfedme import pFedMeClient, pFedMeClientConfig, pFedMeServer, pFedMeServerConfig
from .test_pfedme import test_pfedme
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/pfedme/test_pfedme.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/proxskip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._proxskip import ProxSkipClient, ProxSkipClientConfig, ProxSkipServer, ProxSkipServerConfig
from .test_proxskip import test_proxskip
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/proxskip/test_proxskip.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/scaffold/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ._scaffold import SCAFFOLDClient, SCAFFOLDClientConfig, SCAFFOLDServer, SCAFFOLDServerConfig
from .test_scaffold import test_scaffold
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/algorithms/scaffold/test_scaffold.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from ...data_processing.fed_synthetic import FedSynthetic
from ...data_processing.fedprox_femnist import FedProxFEMNIST
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/compressors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from .compressors import Compressor, CompressorType

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/data_processing/fed_synthetic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Any, Dict, List, Optional, Tuple

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/models/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Dict, List, Optional, Union

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/_register.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import re
import warnings
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import warnings
from typing import Any, Iterable, Optional, Union
Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/feddr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Iterable, Union

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/fedprox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Iterable, Union

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/functional.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Iterable, List, Optional

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/pfedmac.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Any, Iterable, Optional, Union

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/optimizers/scaffold.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from typing import Iterable, Union

Expand Down
3 changes: 1 addition & 2 deletions fl_sim/utils/_download_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import os
import re
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

from pathlib import Path

Expand Down
3 changes: 1 addition & 2 deletions test/test-algorithms/test_apfl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import sys
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions test/test-algorithms/test_ditto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import sys
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions test/test-algorithms/test_feddr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import sys
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions test/test-algorithms/test_feddyn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import sys
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions test/test-algorithms/test_fedopt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import sys
from pathlib import Path
Expand Down
Loading
Loading