blob: d664644dc1f6594d1ca639344ae602cf83ae6c44 [file]
#!/usr/bin/env python
# coding=utf-8
# Copyright [2020] [Apache Software Foundation]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import click
import marvin_python_toolbox.utils.api as api
@click.group('main')
def cli():
pass
@cli.command("acquisitor")
@click.option('--host', '-h', default="https://127.0.0.1:8000")
@click.option('--wait', '-w', default=False, is_flag=True)
def acquisitor(host, wait):
print("{0}/{1}".format(host, 'aq'))
api.run_acquisitor(host, wait)
@cli.command("tpreparator")
@click.option('--host', '-h', default="https://127.0.0.1:8000")
@click.option('--wait', '-w', default=False, is_flag=True)
def tpreparator(host, wait):
api.run_tpreparator(host, wait)
@cli.command("trainer")
@click.option('--host', '-h', default="https://127.0.0.1:8000")
@click.option('--wait', '-w', default=False, is_flag=True)
def trainer(host, wait):
api.run_trainer(host, wait)
@cli.command("evaluator")
@click.option('--host', '-h', default="https://127.0.0.1:8000")
@click.option('--wait', '-w', default=False, is_flag=True)
def evaluator(host, wait):
api.run_evaluator(host, wait)
cli()