This is an automated email from the ASF dual-hosted git repository.

weichen pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-marvin.git

commit 9e2c0da8cf52a3855f2994e8bddba69bd92d3db3
Author: cardosolucas <cardosolucas61....@gmail.com>
AuthorDate: Wed Oct 14 10:08:12 2020 -0300

    Fixing grpchost/grpcport bug
---
 marvin-cli/marvin_cli/management/engine.py   | 10 +++++-----
 marvin-cli/marvin_cli/management/notebook.py | 18 +++++++++---------
 marvin-cli/marvin_cli/management/test.py     | 20 ++++++++++----------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/marvin-cli/marvin_cli/management/engine.py 
b/marvin-cli/marvin_cli/management/engine.py
index 10d12bd..ff33cd2 100644
--- a/marvin-cli/marvin_cli/management/engine.py
+++ b/marvin-cli/marvin_cli/management/engine.py
@@ -98,7 +98,7 @@ def import_project(file, dest):
     type=click.Choice(['all', 'acquisitor', 'tpreparator', 'trainer', 
'evaluator', 'ppreparator', 'predictor', 'feedback']),
     help='Marvin engine action name')
 @click.option('--profiling', '-p', default=False, is_flag=True, 
help='Deterministic profiling of user code.')
-def dryrun(host, port, action, profiling):
+def dryrun(grpchost, grpcport, action, profiling):
     rc = RemoteCalls(host, port)
     rc.run_dryrun(action, profiling)
 
@@ -113,8 +113,8 @@ def dryrun(host, port, action, profiling):
     help='Marvin engine action name')
 @click.option('--max-workers', '-w', help='Max Workers', default=None)
 @click.option('--max-rpc-workers', '-rw', help='Max gRPC Workers', 
default=None)
-def grpc(host, port, action, max_workers, max_rpc_workers):
-    rc = RemoteCalls(host, port)
+def grpc(grpchost, grpcport, action, max_workers, max_rpc_workers):
+    rc = RemoteCalls(grpchost, grpcport)
     rc.run_grpc(action, max_workers, max_rpc_workers)
     try:
         while(True):
@@ -240,12 +240,12 @@ def _sleep(sec):
 @click.option('--profiling', '-p', default=False, is_flag=True, 
help='Deterministic profiling of user code.')
 @click.option('--delay', '-d', default=False, is_flag=True, help='Delay the 
benchmark for 5 seconds.')
 @click.pass_context
-def btest(ctx, host, port, profiling, delay):
+def btest(ctx, grpchost, grpcport, profiling, delay):
     timestamp = generate_timestamp()
     b_thread = benchmark_thread(ctx.obj['package_name'], timestamp)
     actions = ['acquisitor', 'tpreparator', 'trainer',
                 'evaluator']
-    rc = RemoteCalls(host, port)
+    rc = RemoteCalls(grpchost, grpcport)
     initial_time = time.time()
     b_thread.start()
     if delay:
diff --git a/marvin-cli/marvin_cli/management/notebook.py 
b/marvin-cli/marvin_cli/management/notebook.py
index 844dbad..f107ca7 100644
--- a/marvin-cli/marvin_cli/management/notebook.py
+++ b/marvin-cli/marvin_cli/management/notebook.py
@@ -23,18 +23,18 @@ def cli():
     pass
 
 @cli.command("notebook", help="Run custom engine Jupyter Notebook.")
-@click.option('--host', '-h', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
-@click.option('--port', '-p', prompt='gRPC port', help='gRPC Port', 
default='50057')
+@click.option('--grpchost', '-gh', prompt='gRPC host', help='gRPC Host 
Address', default='localhost')
+@click.option('--grpcport', '-gp', prompt='gRPC port', help='gRPC Port', 
default='50057')
 @click.option('--notebook-port', '-np', prompt='Notebook port', help='Notebook 
port', default='8888')
-def notebook(host, port, notebook_port):
-    rc = RemoteCalls()
+def notebook(grpchost, grpcport, notebook_port):
+    rc = RemoteCalls(grpchost, grpcport)
     rc.run_notebook(notebook_port)
 
 @cli.command("lab", help="Run custom engine Jupyter Lab.")
-@click.option('--host', '-h', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
-@click.option('--port', '-p', prompt='gRPC port', help='gRPC Port', 
default='50057')
+@click.option('--host', '-gh', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
+@click.option('--port', '-gp', prompt='gRPC port', help='gRPC Port', 
default='50057')
 @click.option('--notebook-port', '-np', prompt='Notebook port', help='Notebook 
port', default='8888')
 @click.option('--enable-security', '-s', default=False, is_flag=True, 
help='Enable notebook security.')
-def lab(host, port, notebook_port, enable_security):
-    rc = RemoteCalls()
-    rc.run_lab(notebook_port, enable_security)
\ No newline at end of file
+def lab(grpchost, grpcport, notebook_port, enable_security):
+    rc = RemoteCalls(grpchost, grpcport)
+    rc.run_lab(notebook_port, enable_security)
diff --git a/marvin-cli/marvin_cli/management/test.py 
b/marvin-cli/marvin_cli/management/test.py
index abd3dfb..6b7ffb6 100644
--- a/marvin-cli/marvin_cli/management/test.py
+++ b/marvin-cli/marvin_cli/management/test.py
@@ -23,32 +23,32 @@ def cli():
     pass
 
 @cli.command('test', help='Run tests.')
-@click.option('--host', '-h', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
-@click.option('--port', '-p', prompt='gRPC port', help='gRPC Port', 
default='50057')
+@click.option('--grpchost', '-gh', prompt='gRPC host', help='gRPC Host 
Address', default='localhost')
+@click.option('--grpcport', '-gp', prompt='gRPC port', help='gRPC Port', 
default='50057')
 @click.option('--cov/--no-cov', default=True)
 @click.option('--no-capture', is_flag=True)
 @click.option('--pdb', is_flag=True)
 @click.argument('args', default='')
-def test(host, port, cov, no_capture, pdb, args):
+def test(grpchost, grpcport, cov, no_capture, pdb, args):
     rc = RemoteCalls(host, port)
     rc.run_test(cov, no_capture, pdb, args)
 
 @cli.command('test-tox', help='Run tests using Tox environment.')
-@click.option('--host', '-h', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
-@click.option('--port', '-p', prompt='gRPC port', help='gRPC Port', 
default='50057')
+@click.option('--grpchost', '-gh', prompt='gRPC host', help='gRPC Host 
Address', default='localhost')
+@click.option('--grpcport', '-gp', prompt='gRPC port', help='gRPC Port', 
default='50057')
 @click.argument('args', default='--current-env')
-def tox(host, port, args):
+def tox(grpchost, grpcport, args):
     rc = RemoteCalls(host, port)
     rc.run_tox(args)
 
 @cli.command('test-tdd', help='Watch for changes to run tests automatically.')
-@click.option('--host', '-h', prompt='gRPC host', help='gRPC Host Address', 
default='localhost')
-@click.option('--port', '-p', prompt='gRPC port', help='gRPC Port', 
default='50057')
+@click.option('--grpchost', '-gh', prompt='gRPC host', help='gRPC Host 
Address', default='localhost')
+@click.option('--grpcport', '-gp', prompt='gRPC port', help='gRPC Port', 
default='50057')
 @click.option('--cov/--no-cov', default=False)
 @click.option('--no-capture', is_flag=True)
 @click.option('--pdb', is_flag=True)
 @click.option('--partial', is_flag=True)
 @click.argument('args', default='')
-def tdd(host, port, cov, no_capture, pdb, partial, args):
+def tdd(grpchost, grpcport, cov, no_capture, pdb, partial, args):
     rc = RemoteCalls(host, port)
-    rc.run_tdd(cov, no_capture, pdb, partial, args)
\ No newline at end of file
+    rc.run_tdd(cov, no_capture, pdb, partial, args)

Reply via email to