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 Oct 30, 2024
1 parent f6124f2 commit d7c80e1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion mace/tools/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,21 @@ def build_default_arg_parser() -> argparse.ArgumentParser:


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

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

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

0 comments on commit d7c80e1

Please sign in to comment.