-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
228 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
# Copyright 2024 MosaicML LLM Foundry authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from omegaconf import OmegaConf as om | ||
|
||
from llmfoundry.utils.builders import build_callback | ||
|
||
|
||
def test_curriculum_learning_callback_builds(): | ||
kwargs = {'dataset_index': 0} | ||
kwargs = { | ||
'duration': '1ep', | ||
'schedule': [{ | ||
'duration': '1ep', | ||
'train_loader': {} | ||
}] | ||
} | ||
conf_path = 'scripts/train/yamls/pretrain/testing.yaml' | ||
with open(conf_path) as f: | ||
test_cfg = om.load(f) | ||
|
||
callback = build_callback( | ||
'curriculum_learning', | ||
kwargs=kwargs, | ||
train_config={'train_loader': {}}, | ||
train_config=test_cfg, | ||
) | ||
assert callback is not None |