Skip to content

Commit

Permalink
Add config option for pre-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Nov 14, 2024
1 parent eca0bb2 commit 0d5e222
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions mace/tools/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,24 @@ def build_default_arg_parser() -> argparse.ArgumentParser:


def build_preprocess_arg_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
try:
import configargparse

parser = configargparse.ArgumentParser(
config_file_parser_class=configargparse.YAMLConfigFileParser,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add(
"--config",
type=str,
is_config_file=True,
help="config file to agregate options",
)
except ImportError:
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)

parser.add_argument(
"--train_file",
help="Training set h5 file",
Expand Down

0 comments on commit 0d5e222

Please sign in to comment.