【ray】【ray集群管理API】

Ray Cluster Management API

ray start 

ray stop 

ray up 

ray down

ray exec

ray submit

ray attach 

ray get_head_ip

ray monitor 

Ray Cluster Management API

This section contains a reference for the cluster management API. 

ray start 

Start Ray processes manually on the local machine.
在本地计算机上手动启动Ray进程。

ray start [OPTIONS]

Options 选项

--node-ip-address <node_ip_address>
--节点IP地址#

the IP address of this node
此节点IP地址

--address <address> --地址

#

the address to use for Ray
用于Ray的地址

--port <port> --端口号

the port of the head ray process. If not provided, defaults to 6379; if port is set to 0, we will allocate an available port.
头部Ray过程的端口。如果未提供,则默认为6379;如果port设置为0,则我们将分配一个可用端口。

--object-manager-port <object_manager_port>
--对象管理器端口#

the port to use for starting the object manager
用于启动对象管理器的端口

--node-manager-port <node_manager_port>
--节点管理器端口#

the port to use for starting the node manager
用于启动节点管理器的端口

--gcs-server-port <gcs_server_port>
--gcs-server-port #

Port number for the GCS server.
GCS服务器的端口号。

--min-worker-port <min_worker_port>
--min-worker-port #

the lowest port number that workers will bind on. If not set, random ports will be chosen.
worker将绑定的最低端口号。如果未设置,将随机选择端口。

--max-worker-port <max_worker_port>
--max-worker-port

the highest port number that workers will bind on. If set, ‘–min-worker-port’ must also be set.
worker将绑定的最高端口号。如果设置,还必须设置“-min-worker-port”。

--worker-port-list <worker_port_list>
--worker-port-list #

a comma-separated list of open ports for workers to bind on. Overrides ‘–min-worker-port’ and ‘–max-worker-port’.
一个逗号分隔的列表,列出了工作线程要绑定的开放端口。覆盖“-min-worker-port”和“-max-worker-port”。

--ray-client-server-port <ray_client_server_port>
--ray-client-server-port

the port number the ray client server binds on, default to 10001, or None if ray[client] is not installed.
ray客户端服务器绑定的端口号,默认值为10001,如果未安装ray[client],则为None。

--object-store-memory <object_store_memory>
--object-store-memory #

The amount of memory (in bytes) to start the object store with. By default, this is capped at 20GB but can be set higher.
用于启动对象存储的内存量(以字节为单位)。默认情况下,上限为20 GB,但可以设置得更高。

--num-cpus <num_cpus> --num-cpu #

the number of CPUs on this node
此节点上的CPU数量

--num-gpus <num_gpus> --num-gpus #

the number of GPUs on this node
此节点上的GPU数量

--resources <resources> --资源#

a JSON serialized dictionary mapping resource name to resource quantity
JSON序列化字典,将资源名称映射到资源数量

--head --头部编号

provide this argument for the head node
为头节点提供此参数

--include-dashboard <include_dashboard>
--include-dashboard

provide this argument to start the Ray dashboard GUI
提供此参数以启动Ray仪表板GUI

--dashboard-host <dashboard_host>
--dashboard-host #

the host to bind the dashboard server to, either localhost (127.0.0.1) or 0.0.0.0 (available from all interfaces). By default, this is 127.0.0.1
要将仪表板服务器绑定到的主机,localhost(127.0.0.1)或0.0.0.0(可从所有接口获得)。默认情况下,这是127.0.0.1

--dashboard-port <dashboard_port>
--dashboard-port #

the port to bind the dashboard server to–defaults to 8265
绑定仪表板服务器的端口-默认为8265

--dashboard-agent-listen-port <dashboard_agent_listen_port>
--dashboard-agent-dashboard-port #

the port for dashboard agents to listen for http on.
仪表板代理监听http的端口。

--dashboard-agent-grpc-port <dashboard_agent_grpc_port>
--dashboard-agent-grpc-port #

the port for dashboard agents to listen for grpc on.
用于仪表板代理监听GRPC的端口。

--dashboard-grpc-port <dashboard_grpc_port>
--dashboard-grpc-port #

The port for the dashboard head to listen for grpc on.
仪表板头监听grpc的端口。

--runtime-env-agent-port <runtime_env_agent_port>
--运行时-环境-代理-端口号

The port for the runtime enviroment agents to listen for http on.
运行时环境代理侦听http的端口。

--block --区块编号

provide this argument to block forever in this command
在此命令中提供此参数以永久阻止

--plasma-directory <plasma_directory>
--plasma-directory #

object store directory for memory mapped files
内存映射文件的对象存储目录

--autoscaling-config <autoscaling_config>
--autoscaling-config #

the file that contains the autoscaling config
包含自动缩放配置的文件

--no-redirect-output

do not redirect non-worker stdout and stderr to files
不要将非工作stdout和stderr重定向到文件

--plasma-store-socket-name <plasma_store_socket_name>
--plasma-store-socket-name #

manually specify the socket name of the plasma store
手动指定Plasma存储的套接字名称

--raylet-socket-name <raylet_socket_name>
--raylet-socket-name #

manually specify the socket path of the raylet process
手动指定raylet进程的套接字路径

--temp-dir <temp_dir> --temp-dir #

manually specify the root temporary dir of the Ray process, only works when –head is specified
手动指定Ray进程的根临时目录,仅在指定-head时有效

--storage <storage> --存储#

the persistent storage URI for the cluster. Experimental.
集群的持久存储URI。实验性的。

--metrics-export-port <metrics_export_port>
--metrics-export-port #

the port to use to expose Ray metrics through a Prometheus endpoint.
用于通过Prometheus端点公开Ray指标的端口。

--ray-debugger-external

Make the Ray debugger available externally to the node. This is only safe to activate if the node is behind a firewall.
使Ray调试器在节点外部可用。只有当节点位于防火墙后面时,才可以安全地激活此功能。

--disable-usage-stats

If True, the usage stats collection will be disabled.
如果为True,将禁用使用统计信息收集。

--log-style <log_style> --log-style #

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果“漂亮”,则输出格式和颜色。如果为'record',则输出记录样式,不带格式。'auto'默认为'prety',如果stdin不是TTY,则禁用prety日志记录。

Options 选项:

auto | record | pretty

--log-color <log_color># --log-color #

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true

-v--verbose -v,--详细信息#

ray stop 

Stop Ray processes manually on the local machine.
在本地计算机上手动停止射线处理。

ray stop [OPTIONS]

Options 选项

-f--force -f,--强制#

If set, ray will send SIGKILL instead of SIGTERM.
如果设置,Ray将发送SIGKILL而不是SIGTERM。

-g--grace-period <grace_period>
-g,--宽限期#

The time in seconds ray waits for processes to be properly terminated. If processes are not terminated within the grace period, they are forcefully terminated after the grace period.
Ray等待进程正确终止的时间(秒)。如果进程未在宽限期内终止,则在宽限期后强制终止。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

ray up 

Create or update a Ray cluster.
创建或更新Ray群集。

ray up [OPTIONS] CLUSTER_CONFIG_FILE

Options 选项

--min-workers <min_workers>
--最小工人数量

Override the configured min worker node count for the cluster.
覆盖为群集配置的最小工作节点计数。

--max-workers <max_workers>
--max-workers #

Override the configured max worker node count for the cluster.
重新配置群集的最大工作节点计数。

--no-restart

Whether to skip restarting Ray services during the update. This avoids interrupting running jobs.
更新期间是否跳过重新启动Ray服务。这样可以避免中断正在运行的作业。

--restart-only --仅重启#

Whether to skip running setup commands and only restart Ray. This cannot be used with ‘no-restart’.
是否跳过运行设置命令而仅重新启动Ray。这不能与“no-restart”一起使用。

-y--yes - 是,-是#

Don’t ask for confirmation.
不要要求确认。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--no-config-cache

Disable the local cluster config cache.
禁用本地群集配置缓存。

--redirect-command-output

Whether to redirect command output to a file.
是否将命令输出重定向到文件。

--use-login-shells--use-normal-shells
--use-login-shells,--use-normal-shells #

Ray uses login shells (bash –login -i) to run cluster commands by default. If your workflow is compatible with normal shells, this can be disabled for a better user experience.
默认情况下,Ray使用登录shell(bash -login -i)来运行集群命令。如果您的工作流与普通shell兼容,则可以禁用此功能以获得更好的用户体验。

--disable-usage-stats

If True, the usage stats collection will be disabled.
如果为True,将禁用使用统计信息收集。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

ray down

Tear down a Ray cluster.
拆卸Ray群集。

ray down [OPTIONS] CLUSTER_CONFIG_FILE

Options 选项

-y--yes - 是,-是#

Don’t ask for confirmation.
不要要求确认。

--workers-only --仅限工人#

Only destroy the workers.
只有消灭工人。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--keep-min-workers --保留最少工作者#

Retain the minimal amount of workers specified in the config.
保留配置中指定的最小工作线程数。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

ray exec

Execute a command via SSH on a Ray cluster.
在Ray集群上通过SSH执行命令。

ray exec [OPTIONS] CLUSTER_CONFIG_FILE CMD

Options 选项

--run-env <run_env> --run-env #

Choose whether to execute this command in a container or directly on the cluster head. Only applies when docker is configured in the YAML.
选择是在容器中还是直接在群集头上执行此命令。仅适用于在YAML中配置docker的情况。

Options 选项:

auto | host | docker
汽车|主机|Docker

--stop --停止#

Stop the cluster after the command finishes running.
命令运行结束后停止群集。

--start --开始#

Start the cluster if needed.
如果需要,启动群集。

--screen --屏幕编号

Run the command in a screen.
在屏幕中运行命令。

--tmux

Run the command in tmux.
在tmux中运行命令。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--no-config-cache

Disable the local cluster config cache.
禁用本地群集配置缓存。

-p--port-forward <port_forward>
-p,--port-forward #

Port to forward. Use this multiple times to forward multiple ports.
端口转发。多次使用此选项可转发多个端口。

--disable-usage-stats

If True, the usage stats collection will be disabled.
如果为True,将禁用使用统计信息收集。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

CMD CMD编号

Required argument 此参数为必选项

ray submit

Uploads and runs a script on the specified cluster.
在指定的群集上运行脚本。

The script is automatically synced to the following location:
脚本自动同步到以下位置:

os.path.join(“~”, os.path.basename(script))
os.path.join(“~",os.path. baseband(script))

Example: 范例:

ray submit [CLUSTER.YAML] experiment.py – –smoke-test
ray submit [CLUSTER.YAML] experiment.py--smoke-test

ray submit [OPTIONS] CLUSTER_CONFIG_FILE SCRIPT [SCRIPT_ARGS]...

Options 选项

--stop --停止#

Stop the cluster after the command finishes running.
命令运行结束后停止群集。

--start --开始#

Start the cluster if needed.
如果需要,启动群集。

--screen --屏幕编号

Run the command in a screen.
在屏幕中运行命令。

--tmux

Run the command in tmux.
在tmux中运行命令。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--no-config-cache

Disable the local cluster config cache.
禁用本地群集配置缓存。

-p--port-forward <port_forward>
-p,--port-forward #

Port to forward. Use this multiple times to forward multiple ports.
端口转发。多次使用此选项可转发多个端口。

--args <args> --args #

(deprecated) Use ‘– –arg1 –arg2’ for script args.
(已弃用)对脚本参数使用“- -arg 1-arg 2”。

--disable-usage-stats

If True, the usage stats collection will be disabled.
如果为True,将禁用使用统计信息收集。

--extra-screen-args <extra_screen_args>
--extra-screen-args #

if screen is enabled, add the provided args to it. A useful example usage scenario is passing –extra-screen-args=’-Logfile /full/path/blah_log.txt’ as it redirects screen output also to a custom file
如果启用了screen,则将提供的参数添加到其中。一个有用的示例使用场景是传递-extra-screen-args ='-Logfile/full/path/blah_log. txt',因为它也将屏幕输出重定向到自定义文件

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

SCRIPT 测试编号

Required argument 此参数为必选项

SCRIPT_ARGS ARGS编号

Optional argument(s) 可选参数

ray attach 

Create or attach to a SSH session to a Ray cluster.
创建或连接到Ray群集的SSH会话。

ray attach [OPTIONS] CLUSTER_CONFIG_FILE

Options 选项

--start --开始#

Start the cluster if needed.
如果需要,启动群集。

--screen --屏幕编号

Run the command in screen.
在屏幕中运行命令。

--tmux

Run the command in tmux.
在tmux中运行命令。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--no-config-cache

Disable the local cluster config cache.
禁用本地群集配置缓存。

-N--new -N,--new #

Force creation of a new screen.
强制创建新屏幕。

-p--port-forward <port_forward>
-p,--port-forward #

Port to forward. Use this multiple times to forward multiple ports.
端口转发。多次使用此选项可转发多个端口。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

ray get_head_ip

Return the head node IP of a Ray cluster.
返回Ray集群的头节点IP。

ray get_head_ip [OPTIONS] CLUSTER_CONFIG_FILE

Options 选项

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

ray monitor 

Tails the autoscaler logs of a Ray cluster.
将Ray群集的自动缩放器日志置于尾部。

ray monitor [OPTIONS] CLUSTER_CONFIG_FILE

Options 选项

--lines <lines> --行数

Number of lines to tail.
要跟踪的行数。

-n--cluster-name <cluster_name>
-n,--群集名称#

Override the configured cluster name.
覆盖已配置的群集名称。

--log-style <log_style> --日志样式#

If ‘pretty’, outputs with formatting and color. If ‘record’, outputs record-style without formatting. ‘auto’ defaults to ‘pretty’, and disables pretty logging if stdin is not a TTY.
如果为'pretty',则输出时带有格式与颜色.如果为'record',则输出不带格式的记录样式。“auto”默认为“pretty”,如果stdin不是TTY,则禁用pretty日志记录。

Options 选项:

auto | record | pretty
汽车|记录|漂亮

--log-color <log_color> --对数颜色#

Use color logging. Auto enables color logging if stdout is a TTY.
使用颜色记录。如果标准输出为TTY,则自动启用颜色记录。

Options 选项:

auto | false | true
汽车|虚假|真正

-v--verbose# -v,--详细信息#

Arguments 论点

CLUSTER_CONFIG_FILE 群集配置文件编号

Required argument 此参数为必选项

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

资源存储库

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值