Skip to content

Commit

Permalink
[Components] Roll forward of #2697 for real. (#2779)
Browse files Browse the repository at this point in the history
* Fix

* clean up
  • Loading branch information
Jiaxiao Zheng authored and k8s-ci-robot committed Dec 28, 2019
1 parent 27f7e77 commit ad5b2eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main():
parser.add_argument('file_or_module', type=str,
help='Either a python file path or a module name.')
parser.add_argument(
'ui_metadata_path',
'--ui_metadata_path',
type=str,
default='/mlpipeline-ui-metadata.json',
help='Path for the file where the mlpipeline-ui-metadata.json data '
Expand All @@ -39,7 +39,7 @@ def main():
if args.ui_metadata_path:
os.environ['KFP_UI_METADATA_PATH'] = args.ui_metadata_path

launch(args.file_or_module, [args.args, args.ui_metadata_path])
launch(args.file_or_module, args.args)

if __name__ == '__main__':
main()
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def launch(file_or_module, args):
Returns:
The return value from the launched function.
"""
if not isinstance(args, list):
args = [args]
try:
module = importlib.import_module(file_or_module)
except Exception:
Expand All @@ -44,4 +42,4 @@ def launch(file_or_module, args):
except Exception:
logging.error('Failed to find the module or file: {}'.format(file_or_module))
sys.exit(1)
return fire.Fire(module, command=[] + args, name=module.__name__)
return fire.Fire(module, command=args, name=module.__name__)

0 comments on commit ad5b2eb

Please sign in to comment.