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
Use epochs instead batch_num. Log current epoch number #95
Conversation
@@ -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. |
There was a problem hiding this comment.
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.
openfl/federated/task/runner_pt.py
Outdated
@@ -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): |
There was a problem hiding this comment.
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?
openfl/federated/task/runner_tf.py
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
Some workspaces used num_batches value for global number of batches. Now all of them use epochs number