当前位置:网站首页>Distributed framework ray - detailed introduction to starting ray and connecting clusters
Distributed framework ray - detailed introduction to starting ray and connecting clusters
2022-06-11 05:43:00 【A long journey begins with a single step】
Ray The program can use the underlying Ray Parallelize and distribute the runtime .Ray The runtime consists of multiple services that are started in the background / Process composition , For communication 、 The data transfer 、 Scheduling, etc .Ray It can run on a laptop 、 Start on a single server or multiple servers .
start-up Ray There are three ways to run :
1、 Implicit pass ray.init()( Start on a single machine Ray, Automatically create ray colony )
2、 adopt CLI Explicit ( adopt CLI start-up Ray (ray start --head --port=6379))
3、 Explicitly through the cluster initiator ( start-up Ray colony (ray up ./xx.sh))
4、 Use Ray The client connects to an existing Ray Runtime
Check ray Whether to initialize
import ray
ray.init()
# Check ray Whether to initialize
if ray.is_initialized() == False
ray.init()
# Show off api
ray.shutdown()
ray client
Ray Client It is a will. Python Script connects to remote Ray Clustered API. actually , It allows you to run as if on a local computer Ray Also use remote Ray colony .
Use ray Client scenario : Requires script or interactive connection to remote , Apply to ray1.5+
ray.init(
"ray://1.2.3.4:10001",
namespace="my_namespace",# Set the namespace of the session
runtime_env={
"working_dir": "files/my_project", "pip": ["toolz", "requests"]},
# Set the running environment of the session
)
Ray Connected to the cluster 3 In the form of
For the convenience of introducing , Suppose the machine A,B,C
1、 if B and C Used to set up the cluster ,A Do development ,A Script to connect to the cluster , Need to use ( Client connection )ray.init(“ray://<head_node_host>:10001”)
2、 if B Is the head node of the cluster , And in B On the development ,B Script to connect to the cluster , Need to use ( Non client connection )
ray.init(“localhost:”)
3、 There is only one machine A, Automatically create clusters , Need to be ( Non client connection ) Use ray.init()
边栏推荐
- Multithreading tutorial (XXVI) field updater and atomic accumulator
- NDK learning notes (VIII) thread related
- Multi threading tutorial (XXIV) cas+volatile
- SwiftUI: Navigation all know
- getBackgroundAudioManager控制音乐播放(类名的动态绑定)
- Fix Yum dependency conflict
- Preliminary understanding of multi task learning
- Mingw-w64 installation instructions
- 袋鼠雲數棧基於CBO在Spark SQL優化上的探索
- More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience
猜你喜欢

If the MAC fails to connect with MySQL, it will start and report an error

Multithreading tutorial (XXVII) CPU cache and pseudo sharing

NDK learning notes (12) native graphics API, using avilib to create an avi video player

Cocoapods installation error

Wechat applet, automatic line feed for purchasing commodity attributes, fixed number of divs, automatic line feed for excess parts

Error:Execution failed for task ':app:buildNative'. & gt; A problem occurred'x/x/x/'NDK build' error resolution

20多种云协作功能,3分钟聊透企业的数据安全经

使用Genymotion Scrapy控制手机

1. use alicloud object OSS (basic)

初步了解多任务学习
随机推荐
1.使用阿里云对象OSS(初级)
[project - what are the supporting materials in the annexes? (18 kinds of 2000 word summary)] project plan of innovation and entrepreneurship competition and supporting materials of Challenge Cup entr
Activity start process record
27. Remove elements
ELK日志系统实战(六):技术选型之vector与filebeat对比
Gilde failed to go to the listener to call back the reason record when loading the Gaussian blur image
Multi thread tutorial (30) meta sharing mode
SwiftUI: Navigation all know
ReferenceError: server is not defined
Multithreading tutorial (XXIII) thread safety without lock
Combing route - Compaction Technology
49. grouping of acronyms
在未来,机器人或 AI 还有多久才能具备人类的创造力?
Metabase源码二次开发之Clojure 安装
Jsonobject jsonarray for parsing
YOLOv5的Tricks | 【Trick8】图片采样策略——按数据集各类别权重采样
Stone game -- leetcode practice
AttributeError: ‘HistGradientBoostingClassifier‘ object has no attribute ‘_ n_ features‘
getBackgroundAudioManager控制音乐播放(类名的动态绑定)
GAMES101作业7-Path Tracing实现过程&代码详细解读