-
Notifications
You must be signed in to change notification settings - Fork 92
Wire total_weights into ML Diagnostics metrics #474
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,7 +217,11 @@ def training_loop(self, p_train_step, pipeline, params, train_states, data_itera | |
| new_time = datetime.datetime.now() | ||
|
|
||
| train_utils.record_scalar_metrics( | ||
| train_metric, new_time - last_step_completion, self.per_device_tflops, unet_learning_rate_scheduler(step) | ||
| train_metric, | ||
| new_time - last_step_completion, | ||
| self.per_device_tflops, | ||
| unet_learning_rate_scheduler(step), | ||
| total_weights=num_model_parameters, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please include the text-encoder parameters when that flag is enabled, keeping the calculation outside the training loop. Please also cover both flag values in a focused test; the current metrics tests supply the count directly and cannot catch this omission. |
||
| ) | ||
| if self.config.write_metrics: | ||
| train_utils.write_metrics(writer, local_metrics_file, running_gcs_metrics, train_metric, step, self.config) | ||
|
|
||
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.
The same counting issue applies here:
num_model_parametersincludes only the UNet, while DreamBooth also updates the text encoder whentrain_text_encoder=True. Please conditionally includetext_encoder_state.paramssototal_weightsreflects all trainable parameters.