• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

philtrade/Ddip: Fastai + PyTorch DDP in Jupyter Notebook

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

philtrade/Ddip

开源软件地址:

https://github.com/philtrade/Ddip

开源编程语言:

Jupyter Notebook 99.8%

开源软件介绍:

Interactive PyTorch DDP Training in FastAI Jupyter Notebooks

Ddip ("Dee dip") --- Distributed Data "interactive" Parallel is a little iPython extension of line and cell magics to bring together fastai lesson notebooks [1] and PyTorch's Distributed Data Parallel [2]. It uses ipyparallel [3] to manage the DDP process group.

Platform tested: single host with multiple Nvidia CUDA GPUs, Ubuntu linux + PyTorch + Python 3, fastai v1 and fastai course-v3.

Features:

"Distributed training doesn’t work in a notebook..."

-- FastAI's tutorial on How to launch a distributed training

Ddip was conceived to address the above, with the following features:

  1. Switch execution easily between PyTorch's multiprocess DDP group and local notebook namespace.

  2. Takes 3 - 5 lines of iPython magics to port a Fastai course v3 notebook to train in DDP.

  3. Reduce chance of GPU out of memory error by automatically emptying GPU cache memory after executing a cell in the GPU proc.

  4. Extensible, to support future versions of fastai.

Summary of speedup observed in FastAI notebooks when trained with 3 GPUs.

Installation:

Current version: 0.1.1

pip install git+https://github.com/philtrade/[email protected]#egg=Ddip

Overview:

Control DDP and cell execution destination using % and %% magics:

  • %load_ext Ddip, to load the extension.
  • %makedip ..., to start/stop/restart a DDP group, and an app, e.g. fastai_v1.
  • %%dip {remote, local, everywhere} ..., where to execute the cell.
  • %autodip {on,off}, to automatically prepend %%dip to subsequent cells.
  • %dipush, and %dipull, to pass objects between the notebook and the DDP namespaces.

How to run DDP with in FastAI notebooks with Ddip:

Known Issues and Room for Improvements

References:

  1. FastAI Course v3

  2. On Distributed Training:

  1. On ipyparallel:



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap