Skip to content

Commit

Permalink
Update tests and resolve accidental recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
JMGaljaard committed May 30, 2022
1 parent 4852ed1 commit af6af25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions fltk/util/task/config/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class LearningParameters:
Dataclass containing configuration parameters for the learning process itself. This includes the Federated learning
parameters as well as some system parameters like cuda.
"""
_total_epochs: int = field(metadata=config(field_name='total_epochs'))
_total_epochs: int = field(metadata=config(field_name='totalEpochs'))
cuda: bool
rounds: Optional[int] = None
epochs_per_round: Optional[int] = None
Expand All @@ -236,8 +236,10 @@ class LearningParameters:
@property
def total_epochs(self):
logging.warning('By default `total_epochs` is not used duruing Federated Learning. This attribute will be'
'changed in a comming release.')
return self.total_epochs
'changed in a coming release.')
return self._total_epochs


@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass(frozen=True)
class ExperimentConfiguration:
Expand Down
2 changes: 1 addition & 1 deletion tests/core/client_smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ def test_fed_client(self, name, net: Nets, dataset: Dataset):
self.assertTrue(fed_client.is_ready())

with patch.object(DS, 'get_train_dataset', fed_client.dataset):
self.assertTrue(fed_client.exec_round(1))
self.assertTrue(fed_client.exec_round(1, 0))

0 comments on commit af6af25

Please sign in to comment.