-
Notifications
You must be signed in to change notification settings - Fork 324
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
Refactor: Move metrics logic to MetricLogger class #1315
base: main
Are you sure you want to change the base?
Conversation
Important The terms of service for this installation has not been accepted. Please ask the Organization owners to visit the Gemini Code Assist Admin Console to sign it. |
max_utils.close_summary_writer(writer) | ||
record_goodput(recorder, config, recorder.record_job_end_time if recorder else None) | ||
clear_buffered_metrics() |
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.
Is this clear no longer needed?
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.
This method is basically setting the global variables to None. I have moved those global variables to class variables instead. AFAIK, python's garbage collector will automatically clear the memory occupied by that class object when program exits. So, this method shouldn't be required.
@gobbleturk - LMK if I am missing anything here.
Description
This PR initiates the refactoring of
train.py
. As part of refactoring effort, we will be:train.py
to a util module that can be re-used by other trainers (To be followed)Tests
Ran MaxText/train.py with
gcs_metrics=True
and metrics_file="/tmp/maxtext_metrics.txt" configurations to ensure that the metrics were stored in a local file, GCS and TensorBoard.Checklist
Before submitting this PR, please make sure (put X in square brackets):