Skip to content

Commit

Permalink
fix cpu/gpu flag parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
houqp committed Jul 12, 2018
1 parent 8aaf07b commit 444d459
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions floyd/cli/default_floyd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# see: https://docs.floydhub.com/floyd_config
# All supported configs:
#
#machine: cpu
Expand Down
6 changes: 3 additions & 3 deletions floyd/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def show_new_job_info(expt_client, job_name, expt_info, mode, open_notebook=True


@click.command()
@click.option('--cpu', default=False, help='Run on a CPU instance')
@click.option('--gpu', default=False, help='Run on a GPU instance')
@click.option('--cpu', is_flag=True, default=False, help='Run on a CPU instance')
@click.option('--gpu', is_flag=True, default=False, help='Run on a GPU instance')
@click.option('--data', multiple=True, help='Data source id to use')
@click.option('--mode',
help='Different floyd modes',
Expand Down Expand Up @@ -190,7 +190,7 @@ def show_new_job_info(expt_client, job_name, expt_info, mode, open_notebook=True
@click.option('--task', help='Run a specified task defined in floyd config file')
@click.argument('command', nargs=-1)
@click.pass_context
def run(ctx, cpu, gpu, env, message, data, mode, open_notebook, follow, tensorboard, gpup, cpup, gpu2, cpu2, max_runtime, command, task):
def run(ctx, cpu, gpu, env, message, data, mode, open_notebook, follow, tensorboard, gpup, cpup, gpu2, cpu2, max_runtime, task, command):
"""
Run a command on Floyd. Floyd will upload contents of the
current directory and run your command remotely.
Expand Down

0 comments on commit 444d459

Please sign in to comment.