mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 15:56:55 +08:00
[docs] Show commands on documentation (#9165)
This commit is contained in:
@@ -621,7 +621,7 @@ def stop(force, verbose):
|
||||
logger.error("Error: %s", ex)
|
||||
|
||||
|
||||
@cli.command(hidden=True)
|
||||
@cli.command()
|
||||
@click.argument("cluster_config_file", required=True, type=str)
|
||||
@click.option(
|
||||
"--no-restart",
|
||||
@@ -657,8 +657,8 @@ def stop(force, verbose):
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Don't ask for confirmation.")
|
||||
def create_or_update(cluster_config_file, min_workers, max_workers, no_restart,
|
||||
restart_only, yes, cluster_name):
|
||||
def up(cluster_config_file, min_workers, max_workers, no_restart, restart_only,
|
||||
yes, cluster_name):
|
||||
"""Create or update a Ray cluster."""
|
||||
if restart_only or no_restart:
|
||||
assert restart_only != no_restart, "Cannot set both 'restart_only' " \
|
||||
@@ -677,7 +677,7 @@ def create_or_update(cluster_config_file, min_workers, max_workers, no_restart,
|
||||
no_restart, restart_only, yes, cluster_name)
|
||||
|
||||
|
||||
@cli.command(hidden=True)
|
||||
@cli.command()
|
||||
@click.argument("cluster_config_file", required=True, type=str)
|
||||
@click.option(
|
||||
"--workers-only",
|
||||
@@ -701,8 +701,8 @@ def create_or_update(cluster_config_file, min_workers, max_workers, no_restart,
|
||||
required=False,
|
||||
type=str,
|
||||
help="Override the configured cluster name.")
|
||||
def teardown(cluster_config_file, yes, workers_only, cluster_name,
|
||||
keep_min_workers):
|
||||
def down(cluster_config_file, yes, workers_only, cluster_name,
|
||||
keep_min_workers):
|
||||
"""Tear down a Ray cluster."""
|
||||
teardown_cluster(cluster_config_file, yes, workers_only, cluster_name,
|
||||
keep_min_workers)
|
||||
@@ -915,7 +915,7 @@ def submit(cluster_config_file, screen, tmux, stop, start, cluster_name,
|
||||
port_forward=port_forward)
|
||||
|
||||
|
||||
@cli.command(hidden=True)
|
||||
@cli.command()
|
||||
@click.argument("cluster_config_file", required=True, type=str)
|
||||
@click.argument("cmd", required=True, type=str)
|
||||
@click.option(
|
||||
@@ -955,8 +955,8 @@ def submit(cluster_config_file, screen, tmux, stop, start, cluster_name,
|
||||
multiple=True,
|
||||
type=int,
|
||||
help="Port to forward. Use this multiple times to forward multiple ports.")
|
||||
def exec_cmd(cluster_config_file, cmd, run_env, screen, tmux, stop, start,
|
||||
cluster_name, port_forward):
|
||||
def exec(cluster_config_file, cmd, run_env, screen, tmux, stop, start,
|
||||
cluster_name, port_forward):
|
||||
"""Execute a command via SSH on a Ray cluster."""
|
||||
port_forward = [(port, port) for port in list(port_forward)]
|
||||
exec_cluster(cluster_config_file, cmd, run_env, screen, tmux, stop, start,
|
||||
@@ -1131,14 +1131,16 @@ def add_command_alias(command, name, hidden):
|
||||
cli.add_command(dashboard)
|
||||
cli.add_command(start)
|
||||
cli.add_command(stop)
|
||||
add_command_alias(create_or_update, name="up", hidden=False)
|
||||
cli.add_command(up)
|
||||
add_command_alias(up, name="create_or_update", hidden=True)
|
||||
cli.add_command(attach)
|
||||
add_command_alias(exec_cmd, name="exec", hidden=False)
|
||||
cli.add_command(exec)
|
||||
add_command_alias(exec, name="exec_cmd", hidden=True)
|
||||
add_command_alias(rsync_down, name="rsync_down", hidden=True)
|
||||
add_command_alias(rsync_up, name="rsync_up", hidden=True)
|
||||
cli.add_command(submit)
|
||||
cli.add_command(teardown)
|
||||
add_command_alias(teardown, name="down", hidden=False)
|
||||
cli.add_command(down)
|
||||
add_command_alias(down, name="teardown", hidden=True)
|
||||
cli.add_command(kill_random_node)
|
||||
add_command_alias(get_head_ip, name="get_head_ip", hidden=True)
|
||||
cli.add_command(get_worker_ips)
|
||||
|
||||
Reference in New Issue
Block a user