Skip to content

Commit

Permalink
support multiple split keywords for train and test split
Browse files Browse the repository at this point in the history
  • Loading branch information
senwu committed Nov 25, 2019
1 parent 3a04dd9 commit 63e4413
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/emmental/utils/parse_arg.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ def parse_arg(parser: Optional[ArgumentParser] = None) -> ArgumentParser:
)

learner_config.add_argument(
"--train_split", type=str, default="train", help="The split for training"
"--train_split",
nargs="+",
type=str,
default=["train"],
help="The split for training",
)

learner_config.add_argument(
Expand All @@ -114,7 +118,11 @@ def parse_arg(parser: Optional[ArgumentParser] = None) -> ArgumentParser:
)

learner_config.add_argument(
"--test_split", type=str, default="test", help="The split for testing"
"--test_split",
nargs="+",
type=str,
default=["test"],
help="The split for testing",
)

learner_config.add_argument(
Expand Down

0 comments on commit 63e4413

Please sign in to comment.