Error with java class org.pytorch.serve.ModelServer when starting TorchServe

username: mike_deepx
cooked: <p>Hello, I have recently installed TorchServe on Windows 10 using pip:</p>
<p>pip install -f <a href="https://download.pytorch.org/whl/torch_stable.html" rel="noopener nofollow ugc">https://download.pytorch.org/whl/torch_stable.html</a> torchserve torch-model-archiver</p>
<p>I had no problems archiving the sample model, it generated the output file densenet161.mar:</p>
<p>torch-model-archiver --model-name densenet161 --version 1.0 --model-file serve/examples/image_classifier/densenet_161/model.py --serialized-file model_store/densenet161-8d451a50.pth --extra-files serve/examples/image_classifier/index_to_name.json --handler image_classifier</p>
<p>But when I try to start the server with following line (model_store subdirectory is inside current directory):</p>
<p>torchserve --start --model-store model_store --models model_store/densenet161.mar</p>
<p>Then I got following error:</p>
<p>Error: Could not find or load main class org.pytorch.serve.ModelServer<br>
Caused by: java.lang.ClassNotFoundException: org.pytorch.serve.ModelServer</p>
<p>Java version:</p>
<p>java –version<br>
java version “11” 2018-09-25<br>
Java™ SE Runtime Environment 18.9 (build 11+28)<br>
Java HotSpot™ 64-Bit Server VM 18.9 (build 11+28, mixed mode)</p>
<p>Python version:</p>
<p>Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32</p>
<p>PyTorch version:</p>
<blockquote>
<blockquote>
<blockquote>
<p>print(torch.<strong>version</strong>)<br>
1.5.0+cpu</p>
</blockquote>
</blockquote>
</blockquote>
<p>I appreciate any help. Thanks in advance.</p>

username: peterjc123
cooked: <aside class="onebox githubissue">
  <header class="source">
      <a href="https://github.com/pytorch/pytorch/issues/32516#issuecomment-621054762" 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/32516#issuecomment-621054762" target="_blank" rel="nofollow noopener">Java bindings for Windows</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2020-01-23" data-time="00:36:08" data-timezone="UTC">12:36AM - 23 Jan 20 UTC</span>
      </div>


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

<div class="github-row">
  <p class="github-content">🚀 Feature
It would be cool if the Java bindings worked on Windows. They don't right now. If you are interested in...</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;">feature</span>
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">module: java</span>
    <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">module: windows</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>


username: mike_deepx
cooked: <p>Thank you for your answer. I see now that this a previously reported issue. Thanks again.</p>