Skip to content

Commit

Permalink
added unit testing for building system_metrics_monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
JackZ-db committed Jun 7, 2024
1 parent b2ddc1d commit 31c904b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/callbacks/test_system_metrics_monitor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 MosaicML LLM Foundry authors
# SPDX-License-Identifier: Apache-2.0

from composer.callbacks import SystemMetricsMonitor
from llmfoundry.utils.builders import build_callback


def test_system_metrics_monitor_callback_builds():
kwargs = {'log_all_data': True}
callback = build_callback(
'system_metrics_monitor',
kwargs=kwargs,
train_config={'train_loader': {}},
)
assert isinstance(callback, SystemMetricsMonitor)
assert getattr(callback, 'log_all_data', None) is True

0 comments on commit 31c904b

Please sign in to comment.