From 55cb0e344c6cb94b6afd4f5e9897457288090794 Mon Sep 17 00:00:00 2001 From: Brian <23239305+b-chu@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:24:22 -0400 Subject: [PATCH 1/2] Add test for logged_config transforms (#1441) --- tests/test_utils.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index dc9bcd9baf..08123846e6 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,7 @@ # Copyright 2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 +import copy from typing import Any, Dict, List import catalogue @@ -70,3 +71,34 @@ def dummy_transform(config: Dict[str, Any]) -> Dict[str, Any]: del catalogue.REGISTRY[ ('llmfoundry', 'config_transforms', 'dummy_transform')] + + +def test_logged_cfg(): + config = DictConfig({ + 'global_train_batch_size': 1, + 'device_train_microbatch_size': 1, + 'model': {}, + 'scheduler': {}, + 'max_seq_len': 128, + 'train_loader': {}, + 'max_duration': 1, + 'tokenizer': {}, + 'eval_interval': 1, + 'seed': 1, + 'optimizer': {}, + 'variables': {}, + },) + logged_config, _ = make_dataclass_and_log_config( + config, + TrainConfig, + TRAIN_CONFIG_KEYS, + transforms='all', + ) + expected_config = copy.deepcopy(config) + expected_config.update({ + 'n_gpus': 1, + 'device_train_batch_size': 1, + 'device_train_grad_accum': 1, + 'device_eval_batch_size': 1, + }) + assert expected_config == logged_config From d3c01a0473ba084bc1582b87b9a6076ed8e7ba5b Mon Sep 17 00:00:00 2001 From: Irene Dea Date: Mon, 12 Aug 2024 12:03:37 -0700 Subject: [PATCH 2/2] Bump version to 0.12.0.dev0. (#1447) --- llmfoundry/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmfoundry/_version.py b/llmfoundry/_version.py index 4c11746b43..2f1f590b19 100644 --- a/llmfoundry/_version.py +++ b/llmfoundry/_version.py @@ -3,4 +3,4 @@ """The LLM Foundry Version.""" -__version__ = '0.11.0.dev' +__version__ = '0.12.0.dev0'