mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 18:11:38 +08:00
[Project] Implementing Project CLI (#5397)
This commit is contained in:
@@ -16,6 +16,7 @@ from ray.autoscaler.commands import (
|
||||
rsync, teardown_cluster, get_head_node_ip, kill_node, get_worker_node_ips)
|
||||
import ray.ray_constants as ray_constants
|
||||
import ray.utils
|
||||
from ray.projects.scripts import project_cli, session_cli
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -706,17 +707,6 @@ def get_worker_ips(cluster_config_file, cluster_name):
|
||||
click.echo("\n".join(worker_ips))
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.argument("command", required=True, type=str)
|
||||
@click.option(
|
||||
"--dry",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Print actions instead of running them.")
|
||||
def session(command, dry):
|
||||
ray.projects.load_project(os.getcwd())
|
||||
|
||||
|
||||
@cli.command()
|
||||
def stack():
|
||||
COMMAND = """
|
||||
@@ -802,9 +792,10 @@ cli.add_command(teardown, name="down")
|
||||
cli.add_command(kill_random_node)
|
||||
cli.add_command(get_head_ip, name="get_head_ip")
|
||||
cli.add_command(get_worker_ips)
|
||||
cli.add_command(session)
|
||||
cli.add_command(stack)
|
||||
cli.add_command(timeline)
|
||||
cli.add_command(project_cli)
|
||||
cli.add_command(session_cli)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user