Skip to content

Commit

Permalink
gang
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalioglu committed Feb 6, 2025
1 parent 49fb44f commit 7acb38b
Show file tree
Hide file tree
Showing 22 changed files with 550 additions and 613 deletions.
12 changes: 6 additions & 6 deletions src/fairseq2/cli/commands/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def init_parser(self, parser: ArgumentParser) -> None:
)

parser.add_argument(
"--config-override",
"--config-file",
dest="config_override_files",
metavar="CONFIG_OVERRIDE_FILE",
metavar="CONFIG_FILE",
type=Path,
action="append",
nargs="*",
help="configuration override file(s)",
help="configuration file(s)",
)

parser.add_argument(
Expand All @@ -114,7 +114,7 @@ def init_parser(self, parser: ArgumentParser) -> None:
parser.add_argument(
"--export-config",
action="store_true",
help="export the configuration in mergeable format to standard output",
help="dump the configuration in mergeable format to standard output",
)

parser.add_argument(
Expand Down Expand Up @@ -498,8 +498,6 @@ def __init__(self, env: Mapping[str, str], yaml_dumper: YamlDumper) -> None:
self._yaml_dumper = yaml_dumper

def dump(self, recipe_config: object, output_dir: Path) -> None:
recipe_config = unstructure(recipe_config)

log_config(log, "Config", recipe_config)

try:
Expand All @@ -514,6 +512,8 @@ def dump(self, recipe_config: object, output_dir: Path) -> None:

file = output_dir.joinpath("config.yaml")

recipe_config = to_mergeable(recipe_config)

try:
self._yaml_dumper.dump(recipe_config, file)
except OSError as ex:
Expand Down
Loading

0 comments on commit 7acb38b

Please sign in to comment.