Skip to content

Commit

Permalink
Command utils + train (#1361)
Browse files Browse the repository at this point in the history
* command_cli

* save

* typo

* no noqa

---------

Co-authored-by: v-chen_data <[email protected]>
  • Loading branch information
KuuCi and v-chen_data authored Jul 16, 2024
1 parent 54746bf commit 12e3896
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion llmfoundry/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import typer

from llmfoundry.cli import registry_cli
from llmfoundry.train import train_from_yaml
from llmfoundry.command_utils import train_from_yaml

app = typer.Typer(pretty_exceptions_show_locals=False)
app.add_typer(registry_cli.app, name='registry')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2024 MosaicML LLM Foundry authors
# SPDX-License-Identifier: Apache-2.0
from llmfoundry.train.train import (
from llmfoundry.command_utils.train import (
TRAIN_CONFIG_KEYS,
TrainConfig,
train,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
import sys

from llmfoundry.train import train_from_yaml
from llmfoundry.command_utils import train_from_yaml

if __name__ == '__main__':
yaml_path, args_list = sys.argv[1], sys.argv[2:]
Expand Down
4 changes: 2 additions & 2 deletions tests/a_scripts/train/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from omegaconf import DictConfig, ListConfig
from omegaconf import OmegaConf as om

from llmfoundry.train import TrainConfig # noqa: E402
from llmfoundry.train import TRAIN_CONFIG_KEYS, train, validate_config
from llmfoundry.command_utils import TrainConfig # noqa: E402
from llmfoundry.command_utils import TRAIN_CONFIG_KEYS, train, validate_config
from llmfoundry.utils.config_utils import (
make_dataclass_and_log_config,
update_batch_size_info,
Expand Down
2 changes: 1 addition & 1 deletion tests/a_scripts/train/test_train_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from omegaconf import DictConfig
from omegaconf import OmegaConf as om

from llmfoundry.train import train # noqa: E402
from llmfoundry.command_utils import train


def make_fake_index_file(path: str) -> None:
Expand Down

0 comments on commit 12e3896

Please sign in to comment.