"cannot initialize type 'WorkerID'" in 1.4.0?

torchholder: <p>After the release today, my tests (pytest with pytest-cov enabled) are now failing with</p>
<pre><code class="lang-auto">collecting ... terminate called after throwing an instance of 'std::runtime_error'

[531]  what(): generic_type: cannot initialize type "WorkerId": an object with that name is already defined

[532] Fatal Python error: Aborted

[533] Current thread 0x00007f13cc0f4740 (most recent call first):

[534]  File "/opt/conda/envs/pytorch/lib/python3.7/site-packages/torch/distributed/rpc/__init__.py", line 16 in &lt;module&gt;
</code></pre>
<p>I’m not using any kind of RPC, and the failure occurs before I actually run any tests… any thoughts?</p>

ptrblck: <p>Could you please create an issue on <a href="https://github.com/pytorch/pytorch/issues">GitHub</a>?</p>

torchholder: <p>My pleasure. I’m not fully sure how to repro though, and may not have time to find out. I just rolled back to 1.3.1 for now and that fixed it.</p>

torchholder: <aside class="quote no-group" data-username="torchholder" data-post="1" data-topic="66805">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/t/ecc23a/48.png" class="avatar"> torchholder:</div>
<blockquote>
<p>I’m not using any kind of RPC, and the failure occurs before I actually run any tests… any thoughts?</p>
</blockquote>
</aside>
<aside class="onebox githubissue" data-onebox-src="https://github.com/pytorch/pytorch/issues/32270">
  <header class="source">

      <a href="https://github.com/pytorch/pytorch/issues/32270" target="_blank" rel="noopener nofollow ugc">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 fill-rule="evenodd" 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/32270" target="_blank" rel="noopener nofollow ugc">'cannot initialize type "WorkerId"' crashing pytest in 1.4.0</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2020-01-16" data-time="05:15:15" data-timezone="UTC">05:15AM - 16 Jan 20 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2020-01-17" data-time="03:06:05" data-timezone="UTC">03:06AM - 17 Jan 20 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/david-alexander-white" target="_blank" rel="noopener nofollow ugc">
          <img alt="david-alexander-white" src="https://avatars.githubusercontent.com/u/59659225?v=4" class="onebox-avatar-inline" width="20" height="20">
          david-alexander-white
        </a>
      </div>
    </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;">
          high priority
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          triage review
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          needs reproduction
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          triaged
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          module: rpc
        </span>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">## 🐛 Bug

After the release today, my tests (pytest with pytest-cov enabled) a<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden">re now failing with

```
collecting ... terminate called after throwing an instance of 'std::runtime_error'

[531]  what(): generic_type: cannot initialize type "WorkerId": an object with that name is already defined

[532] Fatal Python error: Aborted

[533] Current thread 0x00007f13cc0f4740 (most recent call first):

[534]  File "/opt/conda/envs/pytorch/lib/python3.7/site-packages/torch/distributed/rpc/__init__.py", line 16 in &lt;module&gt;
```

on linux. I’m not using any kind of RPC, and the failure occurs before I actually run any tests. i switched back to 1.3.1 and the problem went away.

was requested to submit an issue at https://discuss.pytorch.org/t/cannot-initialize-type-workerid-in-1-4-0/66805, don't have time right now to fill out the full report. can do if it would be super helpful, otherwise i'm just rolling back.


cc @ezyang @gchanan @zou3519 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>


mrshenli: <p>Hmm, this is weird. We no longer have that <code>WorkerId</code> type in 1.4.0, it was there in 1.3.1. Checking</p>

mrshenli: <p>I cannot reproduce this error, but let’s move the discussion to GH issue</p>