Unverified Commit 5cab4230 authored by Theodore Vasiloudis's avatar Theodore Vasiloudis Committed by GitHub
Browse files

[Dist] Add argument in dispatch_data.py to allow user-defined metadata JSON filename. (#5445)

parent 1e792886
...@@ -37,7 +37,7 @@ def get_launch_cmd(args) -> str: ...@@ -37,7 +37,7 @@ def get_launch_cmd(args) -> str:
def submit_jobs(args) -> str: def submit_jobs(args) -> str:
# read the json file and get the remaining argument here. # read the json file and get the remaining argument here.
schema_path = "metadata.json" schema_path = args.metadata_filename
with open(os.path.join(args.in_dir, schema_path)) as schema: with open(os.path.join(args.in_dir, schema_path)) as schema:
schema_map = json.load(schema) schema_map = json.load(schema)
...@@ -101,6 +101,12 @@ def main(): ...@@ -101,6 +101,12 @@ def main():
type=str, type=str,
help="Location of the input directory where the dataset is located", help="Location of the input directory where the dataset is located",
) )
parser.add_argument(
"--metadata-filename",
type=str,
default="metadata.json",
help="Filename for the metadata JSON file that describes the dataset to be dispatched.",
)
parser.add_argument( parser.add_argument(
"--partitions-dir", "--partitions-dir",
type=str, type=str,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment