-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (126 loc) · 3.04 KB
/
pyproject.toml
File metadata and controls
151 lines (126 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "simd"
version = "1.0.0"
description = ""
license = "Apache-2.0"
# Dependencies for your Flower App
dependencies = [
"flwr[simulation]>=1.23.0",
"flwr-datasets[vision]>=0.5.0",
"torch==2.8.0",
"torchvision==0.23.0",
]
[tool.hatch.metadata]
allow-direct-references = true
[project.optional-dependencies]
dev = [
"isort==5.13.2",
"black==24.2.0",
"docformatter==1.7.5",
"mypy==1.8.0",
"pylint==3.3.1",
"pytest==7.4.4",
"pytest-watch==4.2.0",
"ruff==0.4.5",
"types-requests==2.31.0.20240125",
]
[tool.isort]
profile = "black"
[tool.black]
line-length = 88
target-version = ["py310", "py311", "py312"]
[tool.pytest.ini_options]
minversion = "6.2"
addopts = "-qq"
[tool.mypy]
ignore_missing_imports = true
strict = false
plugins = "numpy.typing.mypy_plugin"
[tool.pylint."MESSAGES CONTROL"]
disable = "duplicate-code,too-few-public-methods,useless-import-alias"
good-names = "i,j,k,_,x,y,X,Y,K,N"
max-args = 10
max-attributes = 15
max-locals = 36
max-branches = 20
max-statements = 55
[tool.pylint.typecheck]
generated-members = "numpy.*, torch.*, tensorflow.*"
[[tool.mypy.overrides]]
module = [
"importlib.metadata.*",
"importlib_metadata.*",
]
follow_imports = "skip"
follow_imports_for_stubs = true
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "torch.*"
follow_imports = "skip"
follow_imports_for_stubs = true
[tool.docformatter]
wrap-summaries = 88
wrap-descriptions = 88
[tool.ruff]
target-version = "py310"
line-length = 88
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"proto",
]
[tool.ruff.lint]
select = ["D", "E", "F", "W", "B", "ISC", "C4", "UP"]
fixable = ["D", "E", "F", "W", "B", "ISC", "C4", "UP"]
ignore = ["B024", "B027", "D205", "D209"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.hatch.build.targets.wheel]
packages = ["."]
[tool.flwr.app]
publisher = "tihiera"
# Point to your ServerApp and ClientApp objects
# Format: "<module>:<object>"
[tool.flwr.app.components]
serverapp = "simd.server_app:app"
clientapp = "simd.client_app:app"
# Custom config values accessible via `context.run_config`
[tool.flwr.app.config]
num-server-rounds = 2
fraction-train = 0.5
local-epochs = 1
# Default federation to use when running the app
[tool.flwr.federations]
default = "cluster-gpu"
# Local simulation federation with 10 virtual SuperNodes
[tool.flwr.federations.local-simulation]
options.num-supernodes = 10
options.backend.client-resources.num-cpus = 2
options.backend.client-resources.num-gpus = 0.0
[tool.flwr.federations.cluster-gpu]
# Number of virtual Flower supernodes/clients
options.num-supernodes = 2
# Per-client resource hints (Ray-style)
options.backend.client-resources.num-cpus = 4
options.backend.client-resources.num-gpus = 0.5