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

add eval after all to mosaicmllogger #3496

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions composer/loggers/mosaicml_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def fit_start(self, state: State, logger: Logger) -> None:
def eval_end(self, state: State, logger: Logger) -> None:
self._flush_metadata(force_flush=True)

def eval_after_all(self, state: State, logger: Logger) -> None:
# Log model evaluation finished time for run events
self.log_metadata({'eval_after_all_time': time.time()}, force_flush=True)

def predict_end(self, state: State, logger: Logger) -> None:
self._flush_metadata(force_flush=True)

Expand Down
1 change: 1 addition & 0 deletions tests/loggers/test_mosaicml_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ def test_run_events_logged(monkeypatch):
assert 'mosaicml/training_sub_progress' not in metadata
assert isinstance(metadata['mosaicml/train_finished_time'], float)
assert isinstance(metadata['mosaicml/train_started_time'], float)
assert isinstance(metadata['mosaicml/eval_after_all_time'], float)


def test_token_training_progress_metrics():
Expand Down
Loading