releasing_process.html 20.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
11
  <title>PaddlePaddle发行规范 &mdash; PaddlePaddle  documentation</title>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  

  
  
        <link rel="index" title="Index"
              href="../genindex.html"/>
        <link rel="search" title="Search" href="../search.html"/>
    <link rel="top" title="PaddlePaddle  documentation" href="../index.html"/> 

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/perfect-scrollbar/0.6.14/css/perfect-scrollbar.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/override.css" type="text/css" />
  <script>
  var _hmt = _hmt || [];
  (function() {
    var hm = document.createElement("script");
    hm.src = "//hm.baidu.com/hm.js?b9a314ab40d04d805655aab1deee08ba";
    var s = document.getElementsByTagName("script")[0]; 
    s.parentNode.insertBefore(hm, s);
  })();
  </script>

  

  
  <script src="../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  
  <header class="site-header">
    <div class="site-logo">
      <a href="/"><img src="../_static/images/PP_w.png"></a>
    </div>
    <div class="site-nav-links">
      <div class="site-menu">
65
        <a class="fork-on-github" href="https://github.com/PaddlePaddle/Paddle" target="_blank"><i class="fa fa-github"></i>Fork me on Github</a>
66 67 68 69 70 71 72 73 74 75 76 77
        <div class="language-switcher dropdown">
          <a type="button" data-toggle="dropdown">
            <span>English</span>
            <i class="fa fa-angle-up"></i>
            <i class="fa fa-angle-down"></i>
          </a>
          <ul class="dropdown-menu">
            <li><a href="/doc_cn">中文</a></li>
            <li><a href="/doc">English</a></li>
          </ul>
        </div>
        <ul class="site-page-links">
78
          <li><a href="/">Home</a></li>
79 80 81 82 83 84
        </ul>
      </div>
      <div class="doc-module">
        
        <ul>
<li class="toctree-l1"><a class="reference internal" href="../getstarted/index_en.html">GET STARTED</a></li>
85
<li class="toctree-l1"><a class="reference internal" href="../build_and_install/index_en.html">Install and Build</a></li>
86
<li class="toctree-l1"><a class="reference internal" href="../howto/index_en.html">HOW TO</a></li>
87
<li class="toctree-l1"><a class="reference internal" href="../dev/index_en.html">Development</a></li>
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
</ul>

        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>        
      </div>
    </div>
  </header>
  
  <div class="main-content-wrap">

    
    <nav class="doc-menu-vertical" role="navigation">
        
          
          <ul>
<li class="toctree-l1"><a class="reference internal" href="../getstarted/index_en.html">GET STARTED</a><ul>
110
<li class="toctree-l2"><a class="reference internal" href="../getstarted/quickstart_en.html">Quick Start</a></li>
111 112
</ul>
</li>
113 114 115 116 117
<li class="toctree-l1"><a class="reference internal" href="../build_and_install/index_en.html">Install and Build</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../build_and_install/pip_install_en.html">Install Using pip</a></li>
<li class="toctree-l2"><a class="reference internal" href="../build_and_install/docker_install_en.html">Run in Docker Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../build_and_install/build_en.html">Build using Docker</a></li>
<li class="toctree-l2"><a class="reference internal" href="../build_and_install/build_from_source_en.html">Build from Sources</a></li>
118 119 120
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../howto/index_en.html">HOW TO</a><ul>
121 122 123 124
<li class="toctree-l2"><a class="reference internal" href="../howto/cmd_parameter/index_en.html">Set Command-line Parameters</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/cmd_parameter/use_case_en.html">Use Case</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cmd_parameter/arguments_en.html">Argument Outline</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cmd_parameter/detail_introduction_en.html">Detail Description</a></li>
125 126
</ul>
</li>
127 128 129 130 131 132 133 134
<li class="toctree-l2"><a class="reference internal" href="../howto/cluster/index_en.html">Distributed Training</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster/preparations_en.html">Preparations</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster/cmd_argument_en.html">Command-line arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster/multi_cluster/index_en.html">Use different clusters</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../howto/cluster/multi_cluster/fabric_en.html">Cluster Training Using Fabric</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/cluster/multi_cluster/openmpi_en.html">Cluster Training Using OpenMPI</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/cluster/multi_cluster/k8s_en.html">PaddlePaddle On Kubernetes</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/cluster/multi_cluster/k8s_aws_en.html">Distributed PaddlePaddle Training on AWS with Kubernetes</a></li>
135 136
</ul>
</li>
137 138 139 140
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../howto/rnn/index_en.html">RNN Models</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/rnn/rnn_config_en.html">RNN Configuration</a></li>
141 142
</ul>
</li>
143 144 145
<li class="toctree-l2"><a class="reference internal" href="../howto/optimization/gpu_profiling_en.html">Tune GPU Performance</a></li>
</ul>
</li>
146 147 148 149 150 151
<li class="toctree-l1"><a class="reference internal" href="../dev/index_en.html">Development</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../dev/new_layer_en.html">Write New Layers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dev/contribute_to_paddle_en.html">Contribute Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dev/write_docs_en.html">Contribute Documentation</a></li>
</ul>
</li>
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
</ul>

        
    </nav>
    
    <section class="doc-content-wrap">

      

 







<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
      
172
    <li>PaddlePaddle发行规范</li>
173 174 175 176 177 178 179 180
  </ul>
</div>
      
      <div class="wy-nav-content" id="doc-content">
        <div class="rst-content">
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
181 182 183 184
  <div class="section" id="paddlepaddle">
<span id="paddlepaddle"></span><h1>PaddlePaddle发行规范<a class="headerlink" href="#paddlepaddle" title="Permalink to this headline"></a></h1>
<p>PaddlePaddle使用git-flow branching model做分支管理,使用<a class="reference external" href="http://semver.org/">Semantic Versioning</a>标准表示PaddlePaddle版本号。</p>
<p>PaddlePaddle每次发新的版本,遵循以下流程:</p>
185 186 187 188 189
<ol class="simple">
<li><code class="docutils literal"><span class="pre">develop</span></code>分支派生出新的分支,分支名为<code class="docutils literal"><span class="pre">release/版本号</span></code>。例如,<code class="docutils literal"><span class="pre">release/0.10.0</span></code></li>
<li>将新分支的版本打上tag,tag为<code class="docutils literal"><span class="pre">版本号rc.Patch号</span></code>。第一个tag为<code class="docutils literal"><span class="pre">0.10.0rc1</span></code>,第二个为<code class="docutils literal"><span class="pre">0.10.0rc2</span></code>,依次类推。</li>
<li>对这个版本的提交,做如下几个操作:</li>
</ol>
190
<ul>
191 192 193
<li><p class="first">使用Regression Test List作为检查列表,测试本次release的正确性。</p>
<ul>
<li><p class="first">如果失败,记录下所有失败的例子,在这个<code class="docutils literal"><span class="pre">release/版本号</span></code>分支中,修复所有bug后,Patch号加一,到第二步</p>
194
</li>
195
<li><p class="first">修改<code class="docutils literal"><span class="pre">python/setup.py.in</span></code>中的版本信息,并将<code class="docutils literal"><span class="pre">istaged</span></code>字段设为<code class="docutils literal"><span class="pre">True</span></code></p>
196
</li>
197 198 199 200 201 202 203 204 205 206 207 208 209
<li><p class="first">编译这个版本的python wheel包,并发布到pypi。</p>
<ul>
<li><p class="first">由于pypi.python.org目前遵循<a class="reference external" href="https://www.python.org/dev/peps/pep-0513">严格的命名规范PEP 513</a>,在使用twine上传之前,需要重命名wheel包中platform相关的后缀,比如将<code class="docutils literal"><span class="pre">linux_x86_64</span></code>修改成<code class="docutils literal"><span class="pre">manylinux1_x86_64</span></code></p>
</li>
<li><p class="first">pypi上的package名称为paddlepaddle和paddlepaddle_gpu,如果要上传GPU版本的包,需要修改build/python/setup.py中,name: &#8220;paddlepaddle_gpu&#8221;并重新打包wheel包:<code class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">bdist_wheel</span></code></p>
</li>
<li><p class="first">上传方法:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">build</span><span class="o">/</span><span class="n">python</span>
<span class="n">pip</span> <span class="n">install</span> <span class="n">twine</span>
<span class="n">twine</span> <span class="n">upload</span> <span class="n">dist</span><span class="o">/</span><span class="p">[</span><span class="n">package</span> <span class="n">to</span> <span class="n">upload</span><span class="p">]</span>
</pre></div>
</div>
</li>
210
<li><p class="first">编译这个版本的Docker发行镜像,发布到dockerhub。如果失败,修复Docker编译镜像问题,Patch号加一,返回第二步</p>
211
</li>
212 213
</ul>
</li>
214
</ul>
215
</li>
216 217 218 219
</ul>
<ol class="simple">
<li>第三步完成后,将<code class="docutils literal"><span class="pre">release/版本号</span></code>分支合入master分支,并删除<code class="docutils literal"><span class="pre">release/版本号</span></code>分支。将master分支的合入commit打上tag,tag为<code class="docutils literal"><span class="pre">版本号</span></code>。同时再将<code class="docutils literal"><span class="pre">master</span></code>分支合入<code class="docutils literal"><span class="pre">develop</span></code>分支。最后删除<code class="docutils literal"><span class="pre">release/版本号</span></code>分支。</li>
<li>协同完成Release Note的书写</li>
220 221 222
</ol>
<p>需要注意的是:</p>
<ul class="simple">
223
<li><code class="docutils literal"><span class="pre">release/版本号</span></code>分支一旦建立,一般不允许再从<code class="docutils literal"><span class="pre">develop</span></code>分支合入<code class="docutils literal"><span class="pre">release/版本号</span></code>。这样保证<code class="docutils literal"><span class="pre">release/版本号</span></code>分支功能的封闭,方便测试人员测试PaddlePaddle的行为。</li>
224 225
<li><code class="docutils literal"><span class="pre">release/版本号</span></code>分支存在的时候,如果有bugfix的行为,需要将bugfix的分支同时merge到<code class="docutils literal"><span class="pre">master</span></code>, <code class="docutils literal"><span class="pre">develop</span></code><code class="docutils literal"><span class="pre">release/版本号</span></code>这三个分支。</li>
</ul>
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
<div class="section" id="wheelpypi">
<span id="wheelpypi"></span><h2>发布wheel包到pypi<a class="headerlink" href="#wheelpypi" title="Permalink to this headline"></a></h2>
<p>使用<a class="reference external" href="https://paddleci.ngrok.io/project.html?projectId=Manylinux1&amp;tab=projectOverview">PaddlePaddle CI</a>
完成自动化二进制编译,参考下图,选择需要发布的版本(通常包含一个CPU版本和一个GPU版本),点击&#8221;run&#8221;右侧的&#8221;...&#8221;按钮,可以
弹出下面的选择框,在第二个tab (Changes)里选择需要发布的分支,这里选择0.11.0,然后点击&#8221;Run Build&#8221;按钮。等待编译完成后
可以在此页面的&#8221;Artifacts&#8221;下拉框中找到生成的3个二进制文件,分别对应CAPI,<code class="docutils literal"><span class="pre">cp27m</span></code><code class="docutils literal"><span class="pre">cp27mu</span></code>的版本。然后按照上述的方法
使用<code class="docutils literal"><span class="pre">twine</span></code>工具上传即可。</p>
<p><img src="ci_build_whl.png"></p>
<ul class="simple">
<li>注:CI环境使用 https://github.com/PaddlePaddle/buildtools 这里的DockerImage作为编译环境以支持更多的Linux
发型版,如果需要手动编译,也可以使用这些镜像。这些镜像也可以从 https://hub.docker.com/r/paddlepaddle/paddle_manylinux_devel/tags/ 下载得到。</li>
<li>pypi不支持覆盖上传,所以一个版本号的wheel包发布之后,不可以更改。下一个wheel包需要更新版本号才可以上传。</li>
</ul>
</div>
<div class="section" id="docker">
<span id="docker"></span><h2>发布Docker镜像<a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
<p>上述PaddlePaddle CI编译wheel完成后会自动将Docker镜像push到DockerHub,所以,发布Docker镜像只需要对自动push的镜像打上
版本号对应的tag即可:</p>
<ol class="simple">
<li>进入 https://hub.docker.com/r/paddlepaddle/paddle/tags/ 查看latest tag的更新时间是否在上述编译wheel包完成后是否最新。</li>
<li>执行 <code class="docutils literal"><span class="pre">docker</span> <span class="pre">pull</span> <span class="pre">paddlepaddle/paddle:[latest</span> <span class="pre">tag]</span></code>,latest tag可以是latest或latest-gpu等。</li>
<li>执行 <code class="docutils literal"><span class="pre">docker</span> <span class="pre">tag</span> <span class="pre">paddlepaddle/paddle:[latest</span> <span class="pre">tag]</span> <span class="pre">paddlepaddle/paddle:[version]</span></code></li>
<li>执行 <code class="docutils literal"><span class="pre">docker</span> <span class="pre">push</span> <span class="pre">paddlepaddle/paddle:[version]</span></code></li>
</ol>
</div>
251
<div class="section" id="paddlepaddle">
252
<span id="id1"></span><h2>PaddlePaddle 分支规范<a class="headerlink" href="#paddlepaddle" title="Permalink to this headline"></a></h2>
253
<p>PaddlePaddle开发过程使用<a class="reference external" href="http://nvie.com/posts/a-successful-git-branching-model/">git-flow</a>分支规范,并适应github的特性做了一些区别。</p>
254
<ul class="simple">
255
<li>PaddlePaddle的主版本库遵循<a class="reference external" href="http://nvie.com/posts/a-successful-git-branching-model/">git-flow</a>分支规范。其中:<ul>
256 257 258 259 260 261 262 263
<li><code class="docutils literal"><span class="pre">master</span></code>分支为稳定(stable branch)版本分支。每一个<code class="docutils literal"><span class="pre">master</span></code>分支的版本都是经过单元测试和回归测试的版本。</li>
<li><code class="docutils literal"><span class="pre">develop</span></code>分支为开发(develop branch)版本分支。每一个<code class="docutils literal"><span class="pre">develop</span></code>分支的版本都经过单元测试,但并没有经过回归测试。</li>
<li><code class="docutils literal"><span class="pre">release/版本号</span></code>分支为每一次Release时建立的临时分支。在这个阶段的代码正在经历回归测试。</li>
</ul>
</li>
<li>其他用户的fork版本库并不需要严格遵守<a class="reference external" href="http://nvie.com/posts/a-successful-git-branching-model/">git-flow</a>分支规范,但所有fork的版本库的所有分支都相当于特性分支。<ul>
<li>建议,开发者fork的版本库使用<code class="docutils literal"><span class="pre">develop</span></code>分支同步主版本库的<code class="docutils literal"><span class="pre">develop</span></code>分支</li>
<li>建议,开发者fork的版本库中,再基于<code class="docutils literal"><span class="pre">develop</span></code>版本fork出自己的功能分支。</li>
264
<li>当功能分支开发完毕后,向PaddlePaddle的主版本库提交<code class="docutils literal"><span class="pre">Pull</span> <span class="pre">Reuqest</span></code>,进而进行代码评审。<ul>
265 266 267 268 269 270 271 272
<li>在评审过程中,开发者修改自己的代码,可以继续在自己的功能分支提交代码。</li>
</ul>
</li>
</ul>
</li>
<li>BugFix分支也是在开发者自己的fork版本库维护,与功能分支不同的是,BugFix分支需要分别给主版本库的<code class="docutils literal"><span class="pre">master</span></code><code class="docutils literal"><span class="pre">develop</span></code>与可能有的<code class="docutils literal"><span class="pre">release/版本号</span></code>分支,同时提起<code class="docutils literal"><span class="pre">Pull</span> <span class="pre">Request</span></code></li>
</ul>
</div>
273
<div class="section" id="paddlepaddle">
274
<span id="id2"></span><h2>PaddlePaddle回归测试列表<a class="headerlink" href="#paddlepaddle" title="Permalink to this headline"></a></h2>
275 276
<p>本列表说明PaddlePaddle发版之前需要测试的功能点。</p>
<div class="section" id="paddlepaddle-book">
277
<span id="paddlepaddle-book"></span><h3>PaddlePaddle Book中所有章节<a class="headerlink" href="#paddlepaddle-book" title="Permalink to this headline"></a></h3>
278
<p>PaddlePaddle每次发版本首先要保证PaddlePaddle Book中所有章节功能的正确性。功能的正确性包括验证PaddlePaddle目前的<code class="docutils literal"><span class="pre">paddle_trainer</span></code>训练和纯使用<code class="docutils literal"><span class="pre">Python</span></code>训练模型正确性。</p>
279 280 281 282 283 284 285 286 287 288 289
<p>| | 新手入门章节 | 识别数字 | 图像分类 | 词向量 | 情感分析 | 语意角色标注 | 机器翻译 | 个性化推荐 |
| &#8212; | &#8212; | &#8212; | &#8212; | &#8212; | &#8212; | &#8212; | &#8212; | &#8212; |
| API.V2 + Docker + GPU  |  |  |  |  |  |  |  |  |
| API.V2 + Docker + CPU  |  |  |  |  |  |  |  |  |
| <code class="docutils literal"><span class="pre">paddle_trainer</span></code> + Docker + GPU |  |  |  |  |  |  |  |  |
| <code class="docutils literal"><span class="pre">paddle_trainer</span></code> + Docker + CPU |  |  |  |  |  |  |  |  |
| API.V2 + Ubuntu + GPU |  |  |  |  |  |  |  |  |
| API.V2 + Ubuntu + CPU |  |  |  |  |  |  |  |  |
| <code class="docutils literal"><span class="pre">paddle_trainer</span></code> + Ubuntu + GPU |  |  |  |  |  |  |  |  |
| <code class="docutils literal"><span class="pre">paddle_trainer</span></code> + Ubuntu + CPU |  |  |  |  |  |  |  |  |</p>
</div>
290
</div>
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
</div>


           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, PaddlePaddle developers.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../',
            VERSION:'',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
328 329
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ".txt",
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
        };
    </script>
      <script type="text/javascript" src="../_static/jquery.js"></script>
      <script type="text/javascript" src="../_static/underscore.js"></script>
      <script type="text/javascript" src="../_static/doctools.js"></script>
      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
       
  

  
  
    <script type="text/javascript" src="../_static/js/theme.js"></script>
  
  
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/perfect-scrollbar/0.6.14/js/perfect-scrollbar.jquery.min.js"></script>
  <script src="../_static/js/paddle_doc_init.js"></script> 

</body>
</html>