C++ API: Is there a timeline of the major breaking changes to the backend?

username: marcoippolito
cooked: <p>We read from the documentation <a href="https://pytorch.org/cppdocs/" rel="nofollow noopener">https://pytorch.org/cppdocs/</a> “At the moment, the C++ API should be considered “experimental”; we may make major breaking changes to the backend in order to improve the API, or in service of providing the Python interface to PyTorch, which is our most stable and best supported interface.”</p>
<p>So, being interested in developing and deploying pytorch models in C++, I would like to know if there is a timeline of the major breaking changes.</p>
<p>Marco</p>

username: yf225
cooked: <p>For the C++ frontend, there will be BC-breaking changes in v1.4 and v1.5 to make it behave more similar to the Python frontend, and we expect the core components (torch functions / tensor operators / autograd functions / NN functionals / NN layers / optimizers) to be mostly stable afterwards.</p>
<p>If by “deploying pytorch models in C++” you meant running JIT model inference in C++, <a class="mention" href="/u/michael_suo">@Michael_Suo</a> would have more information about it. <img src="https://discuss.pytorch.org/images/emoji/apple/smiley.png?v=9" title=":smiley:" class="emoji" alt=":smiley:"></p>

username: marcoippolito
cooked: <p>Thanks a lot <a class="mention" href="/u/yf225">@yf225</a>  . When pytorch C++ frontend v1.4 and, the following v.1.5 will be made available to use? Are we now at v.1.2 …right?</p>

username: yf225
cooked: <p><a class="mention" href="/u/marcoippolito">@marcoippolito</a> We are now at v1.3 (<a href="https://pytorch.org/blog/pytorch-1-dot-3-adds-mobile-privacy-quantization-and-named-tensors/" rel="nofollow noopener">https://pytorch.org/blog/pytorch-1-dot-3-adds-mobile-privacy-quantization-and-named-tensors/</a>), and we usually release new versions every 2-3 months. <img src="https://discuss.pytorch.org/images/emoji/apple/smiley.png?v=9" title=":smiley:" class="emoji" alt=":smiley:"></p>

username: marcoippolito
cooked: <p>So it means that it’s better to wait 4/5 months to the version v.1.5 in order to work with a rather stable version?</p>

username: yf225
cooked: <p>The BC-breaking changes would mostly be NN layer options parameter name changes, NN layer / optimizer behavior changes and torch function default dtype changes to make them consistent with the Python frontend, and we will thoroughly document them in the upcoming releases. If the goal is to have the least maintenance overhead when upgrading to v1.4 or v1.5, it would be a good idea to wait for v1.5 to work with a rather stable version.</p>

username: marcoippolito
cooked: <p>From here <a href="https://pytorch.org/cppdocs/" rel="nofollow noopener">https://pytorch.org/cppdocs/</a> it seems that the C++API is still in beta release.<br>
What version are we now? v1.4 or v1.5?</p>

username: marcoippolito
cooked: <p><a class="mention" href="/u/yf225">@yf225</a></p>
<p>Hi!<br>
here : <a href="https://pytorch.org/blog/pytorch-1-dot-5-released-with-new-and-updated-apis/" rel="nofollow noopener">https://pytorch.org/blog/pytorch-1-dot-5-released-with-new-and-updated-apis/</a><br>
we read : “Today, we’re announcing the availability of PyTorch 1.5, along with new and updated libraries. This release includes several major new API additions and improvements. PyTorch now includes a significant update to the C++ frontend, ‘channels last’ memory format for computer vision models, and a stable release of the distributed RPC framework used for model-parallel training. The release also has new APIs for autograd for hessians and jacobians, and an API that allows the creation of Custom C++ Classes that was inspired by pybind.”<br>
" C++ Frontend API (Stable)<br>
The C++ frontend API is now at parity with Python, and the features overall have been moved to ‘stable’ (previously tagged as experimental)."</p>
<p>But here: <a href="https://pytorch.org/cppdocs/" rel="nofollow noopener">https://pytorch.org/cppdocs/</a></p>
<p>"</p>
<p>Warning</p>
<p>At the moment, the C++ API should be considered “beta” stability; we may make major breaking changes to the backend in order to improve the API, or in service of providing the Python interface to PyTorch, which is our most stable and best supported interface.<br>
"<br>
What does it mean? Is the C++API now stable or still in “beta”?<br>
Could you please clarify?<br>
Thanks in advance</p>

username: glaringlee
cooked: <p><a class="mention" href="/u/marcoippolito">@marcoippolito</a><br>
It seems our cppdoc is outdated. We are working on an update.<br>
C++ API is stable now, we keep adding features though. <a class="mention" href="/u/yf225">@yf225</a></p>

username: marcoippolito
cooked: <p>In case the effort needed to give a boost to the desired C++ API is at the moment too high,<br>
</p><aside class="onebox githubissue">
  <header class="source">
      <a href="https://github.com/pytorch/pytorch/issues/25883" target="_blank" rel="nofollow noopener">github.com/pytorch/pytorch</a>
  </header>
  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/pytorch/issues/25883" target="_blank" rel="nofollow noopener">Python/C++ API Parity: torch.nn modules and functional</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2019-09-09" data-time="22:35:40" data-timezone="UTC">10:35PM - 09 Sep 19 UTC</span>
      </div>


      <div class="user">
        <a href="https://github.com/yf225" target="_blank" rel="nofollow noopener">
          <img alt="yf225" src="https://avatars0.githubusercontent.com/u/4063635?v=4" class="onebox-avatar-inline" width="20" height="20">
          yf225
        </a>
      </div>
    </div>
  </div>
</div>

<div class="github-row">
  <p class="github-content">Currently, PyTorch C++ API is missing many torch::nn layers that are available in the Python API. As part of the Python/C++...</p>
</div>

<div class="labels">
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">good first issue</span>
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">module: cpp</span>
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">module: nn</span>
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">triaged</span>
</div>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
<br>
I would suggest to ask for collective help within the C++ wide community.<br>
I’m sure many C++ developers, who are notoriously willing to embark in difficult achievements, will be happy to help such great project like PyTorch

username: glaringlee
cooked: <p><a class="mention" href="/u/marcoippolito">@marcoippolito</a><br>
Thanks for advise, yep, we will prioritize our work and definitely asking help lol.<br>
Please following up here to see our further actions.</p>