Skip to Content
Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署
book

Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署

by Max Pumperla, Edward Oakes, Richard Liaw
May 2024
Intermediate
252 pages
5h 31m
Chinese
China Machine Press
Content preview from Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署
Ray Core
入门
|
33
Ray
简洁而强大的
API
实现并行计算。例如,通过基于
Ray
的示例以高效且异
步的方式运行数据并行任务,这是使用其他工具很难复制的快捷方式。本章讨
论了任务和执行器的工作方式,任务和执行器分别对应
Python
中的函数和类,
但具有分布式功能。你还将学习如何将对象放入
Ray
的对象存储中以及如何检
索它们。我们使用
Ray Core API
6
个基本
API
调用,为
3
个基本概念(任务、
执行器和对象)提供具体示例。最后,我们将讨论
Ray
的底层系统组件及其架
构。换句话说,本章将深入剖析
Ray
引擎的内部机制。
2.1 Ray Core
简介
本章的主要内容是一个扩展的
Ray Core
示例,并通过示例介绍
Ray
中的概念。
与之前一样,读者可以通过自己输入代码(强烈推荐)或者按照本章
notebook
https://oreil.ly/lMmfp
)进行操作。无论哪种方式,都需
要确保通过
pip install ray
安装了
Ray
1
章介绍了如何通过调用
import ray
启动本地集群,然后使用
ray.init()
进行初始化。运行这段代码后,将看到以下形式的输出。这段输出省略了很多
信息,因为了解这些信息需要了解更多
Ray
的内部机制:
... INFO services.py:1263 -- View the Ray dashboard at http://127.0.0.1:8265
{'node_ip_address': '192.168.1.41',
...
'node_id': '...'} ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

通过可观测性确保数据与AI的可靠性

通过可观测性确保数据与AI的可靠性

Barr Moses, Michael Segner

Publisher Resources

ISBN: 9787111753384