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

Fix B018 error for latest flake8-bugbear #249

Merged
merged 1 commit into from
Nov 29, 2021
Merged
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
5 changes: 1 addition & 4 deletions openfl-workspace/torch_cnn_mnist/src/pt_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def init_network(self,
fully-connected layer (Default = 500)
**kwargs: Additional arguments to pass to the function

"""
'''
FIXME: We are tracking only side lengths (rather than
length and width) as we are assuming square
shapes for feature and kernels.
Expand All @@ -91,8 +89,7 @@ def init_network(self,
(Note this criterion held for the original input sizes considered
for this model: 28x28 and 32x32 when used with the default values
above)

'''
"""
self.pool_sqrkernel_size = pool_sqrkernel_size
channel = self.data_loader.get_feature_shape()[0] # (channel, dim1, dim2)
self.conv1 = nn.Conv2d(channel, conv1_channels_out, conv_sqrkernel_size, 1)
Expand Down
24 changes: 11 additions & 13 deletions openfl/component/collaborator/collaborator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,21 @@ class DevicePolicy(Enum):


class OptTreatment(Enum):
"""Optimizer Methods."""
"""Optimizer Methods.

RESET = 1
'''
RESET tells each collaborator to reset the optimizer state at the beginning
- RESET tells each collaborator to reset the optimizer state at the beginning
of each round.
'''
CONTINUE_LOCAL = 2
'''
CONTINUE_LOCAL tells each collaborator to continue with the local optimizer

- CONTINUE_LOCAL tells each collaborator to continue with the local optimizer
state from the previous round.
'''
CONTINUE_GLOBAL = 3
'''
CONTINUE_GLOBAL tells each collaborator to continue with the federally

- CONTINUE_GLOBAL tells each collaborator to continue with the federally
averaged optimizer state from the previous round.
'''
"""

RESET = 1
CONTINUE_LOCAL = 2
CONTINUE_GLOBAL = 3


class Collaborator:
Expand Down