Skip to content

Commit

Permalink
Register mosaic logger (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Sep 23, 2024
1 parent 85403c0 commit f377090
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llmfoundry/loggers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from composer.loggers import (
InMemoryLogger,
MLFlowLogger,
MosaicMLLogger,
TensorboardLogger,
WandBLogger,
)
Expand All @@ -18,3 +19,4 @@
func=InMemoryLogger,
) # for backwards compatibility
loggers.register('mlflow', func=MLFlowLogger)
loggers.register('mosaicml', func=MosaicMLLogger)
16 changes: 16 additions & 0 deletions tests/loggers/test_mosaic_ml_logger.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.loggers import MosaicMLLogger

from llmfoundry.utils.builders import build_logger


def test_mosaic_ml_logger_constructs():
mosaic_ml_logger = build_logger(
'mosaicml',
kwargs={'ignore_exceptions': True},
)

assert isinstance(mosaic_ml_logger, MosaicMLLogger)
assert mosaic_ml_logger.ignore_exceptions == True

0 comments on commit f377090

Please sign in to comment.