Skip to content

Commit

Permalink
Merge pull request #239 from kartynnik/main
Browse files Browse the repository at this point in the history
Support specifying model paths as separate arguments
  • Loading branch information
jinjingforever authored Nov 8, 2024
2 parents fd0ba53 + 8888c4e commit 4ae6df3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/server/package/src/model_explorer/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
'model_paths', nargs='?', help='comma separated model file paths'
'model_paths', nargs='*', help='model file paths, space- or comma-separated'
)
parser.add_argument('--host', default=DEFAULT_HOST, help='host of the server')
parser.add_argument(
Expand Down Expand Up @@ -76,9 +76,10 @@
def main():
"""Entry point for the command line version of model explorer."""

model_paths: list[str] = []
if args.model_paths is not None and args.model_paths != '':
model_paths = [x.strip() for x in args.model_paths.split(',')]
model_paths: list[str] = args.model_paths
if len(args.model_paths) == 1:
comma_separated_model_paths = args.model_paths[0]
model_paths = [x.strip() for x in comma_separated_model_paths.split(',')]

node_data_paths: list[str] = []
if args.node_data_paths is not None and args.node_data_paths != '':
Expand Down

0 comments on commit 4ae6df3

Please sign in to comment.