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

Use epochs instead batch_num. Log current epoch number #95

Merged

Conversation

maradionov
Copy link
Contributor

Some workspaces used num_batches value for global number of batches. Now all of them use epochs number

@@ -60,7 +60,8 @@ def rebuild_model(self, round_num, input_tensor_dict, validation=False):
else:
self.set_tensor_dict(input_tensor_dict, with_opt_vars=False)

def train(self, col_name, round_num, input_tensor_dict, metrics, num_batches=None, **kwargs):
def train(self, col_name, round_num, input_tensor_dict,
metrics, epochs=1, batch_size=1, **kwargs):
"""
Perform the training for a specified number of batches.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring should be updated since num_batches is not specified anymore.

@@ -129,7 +129,7 @@ def validate(self, col_name, round_num, input_tensor_dict,
return output_tensor_dict, {}

def train_batches(self, col_name, round_num, input_tensor_dict,
num_batches=None, use_tqdm=False, **kwargs):
num_batches=None, use_tqdm=False, epochs=1, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could num_batches be removed here as well?

@@ -84,7 +84,7 @@ def rebuild_model(self, round_num, input_tensor_dict, validation=False):
self.set_tensor_dict(input_tensor_dict, with_opt_vars=False)

def train_batches(self, col_name, round_num, input_tensor_dict,
num_batches, use_tqdm=False, **kwargs):
epochs=1, use_tqdm=False, **kwargs):
"""
Perform the training for a specified number of batches.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring should be updated since num_batches is not specified anymore.

@alexey-gruzdev alexey-gruzdev merged commit 0a695d5 into securefederatedai:develop Aug 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants