Skip to content

Commit f377090

Browse files
authored
Register mosaic logger (#1542)
1 parent 85403c0 commit f377090

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

llmfoundry/loggers/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from composer.loggers import (
55
InMemoryLogger,
66
MLFlowLogger,
7+
MosaicMLLogger,
78
TensorboardLogger,
89
WandBLogger,
910
)
@@ -18,3 +19,4 @@
1819
func=InMemoryLogger,
1920
) # for backwards compatibility
2021
loggers.register('mlflow', func=MLFlowLogger)
22+
loggers.register('mosaicml', func=MosaicMLLogger)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2024 MosaicML LLM Foundry authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
from composer.loggers import MosaicMLLogger
5+
6+
from llmfoundry.utils.builders import build_logger
7+
8+
9+
def test_mosaic_ml_logger_constructs():
10+
mosaic_ml_logger = build_logger(
11+
'mosaicml',
12+
kwargs={'ignore_exceptions': True},
13+
)
14+
15+
assert isinstance(mosaic_ml_logger, MosaicMLLogger)
16+
assert mosaic_ml_logger.ignore_exceptions == True

0 commit comments

Comments
 (0)