Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Jul 5, 2024
1 parent c68eb80 commit 9ad2ee3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 5 additions & 3 deletions llmfoundry/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
app.add_typer(registry_cli.app, name='registry')

@app.command(name="train")
def train(yaml_path: str = typer.Argument(..., help="Path to the YAML configuration file")):
def train(
yaml_path: str = typer.Argument(..., help="Path to the YAML configuration file"),
additional_args: list = typer.Argument(None, help="Additional command line arguments")
):
"""Run the training with the given configuration and optional overrides from command line."""
args_list = sys.argv[2:] # assuming additional arguments may follow the yaml_path
run_trainer(yaml_path, args_list)
run_trainer(yaml_path, additional_args)

if __name__ == '__main__':
app()
3 changes: 0 additions & 3 deletions llmfoundry/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ def run_trainer(
yaml_path: str,
args_list: str
):
print('-----------')
print(yaml_path, args_list)
# Disable resolving environment variables through omegaconf.
om.clear_resolver('oc.env')

Expand All @@ -582,7 +580,6 @@ def run_trainer(
cfg,
DictConfig,
), 'Configuration must be a DictConfig instance.'
print(cfg)
main(cfg)


Expand Down

0 comments on commit 9ad2ee3

Please sign in to comment.