没有合适的资源?快使用搜索试试~ 我知道了~
适用于 Python 的 Backend.AI 客户端 SDK 文档.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 156 浏览量
2024-04-14
08:42:41
上传
评论
收藏 353KB PDF 举报
温馨提示
试读
74页
适用于 Python 的 Backend.AI 客户端 SDK 文档.pdf
资源推荐
资源详情
资源评论
Backend.AI Client SDK for Python
Documentation
Release 22.03.2
Lablup Inc.
Mar 25, 2023
GETTING STARTED
1 Quickstart 3
2 Getting Started 5
2.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Linux/macOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.3 Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Client Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Command-line Interface 9
3.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 Session Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.2 API Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.3 Checking out the current configuration . . . . . . . . . . . . . . . . . . 10
3.2 Compute Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 Listing sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2 Running simple sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.3 Running sessions with accelerators . . . . . . . . . . . . . . . . . . . . 12
3.2.4 Terminating or cancelling sessions . . . . . . . . . . . . . . . . . . . . . 12
3.3 Container Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.1 Starting a session and connecting to its Jupyter Notebook . . . . . . . 13
3.3.2 Accessing sessions via a web terminal . . . . . . . . . . . . . . . . . . . 13
3.3.3 Accessing sessions via native SSH/SFTP . . . . . . . . . . . . . . . . . 14
3.4 Storage Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4.1 Creating vfolders and managing them . . . . . . . . . . . . . . . . . . . 15
3.4.2 File transfers and management . . . . . . . . . . . . . . . . . . . . . . . 16
3.4.3 Running sessions with storages . . . . . . . . . . . . . . . . . . . . . . 16
3.4.4 Creating default files for kernels . . . . . . . . . . . . . . . . . . . . . . 17
3.5 Advanced Code Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5.1 Running concurrent experiment sessions . . . . . . . . . . . . . . . . . 17
3.6 Session Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6.1 Creating and starting session template . . . . . . . . . . . . . . . . . . 18
i
3.6.2 Full syntax for task template . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Developer Reference 21
4.1 Developer Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1.1 Client Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Synchronous-mode execution . . . . . . . . . . . . . . . . . . . . . . . . 23
Asynchronous-mode Execution . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.3 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Unit Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Integration Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2 High-level Function Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.1 Admin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.2 Agent Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3 Auth Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.4 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2.5 KeyPair Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.6 Manager Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2.7 Scaling Group Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.2.8 ComputeSession Functions . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2.9 Session Template Functions . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.10 Virtual Folder Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.3 Low-level SDK Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3.1 Base Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3.2 Request API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3.3 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3.4 Miscellaneous Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5 Indices and tables 61
Python Module Index 63
Index 65
ii
剩余73页未读,继续阅读
资源评论
百态老人
- 粉丝: 1707
- 资源: 2万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功