question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

models "all" option only starts first mode found in model store

See original GitHub issue

Issue

Torchserve start with models “all” option only starts the first model found in the model store unless snapshots are disabled. All models are started if the --ncs option is added.

Only first model is started

torchserve --start --model-store model_store --models all

All models are started

torchserve --start --ncs --model-store model_store --models all
  • torchserve version: 0.1.1
  • Operating System and version: ubuntu 18.04

Environment

  • Installed using source? [yes/no]: yes
  • Are you planning to deploy it using docker container? [yes/no]: no
  • Is it a CPU or GPU environment?: GPU
  • Using a default/custom handler? [If possible upload/share custom handler/model]: Using Custom Handlers
  • What kind of model is it e.g. vision, text, audio?: Image Segmentation
  • Are you planning to use local models from model-store or public url being used e.g. from S3 bucket etc.? [If public url then provide link.]: Local model store
  • Provide config.properties, logs [ts.log] and parameters used for model registration/update APIs:
  • Link to your project [if any]:

Expected Behavior

The “all” option should start all the models found in the model store

Current Behavior

Only the first model found is started unless the --ncs option is supplied

Steps to Reproduce

  1. Create two .mar files
  2. Add both .mar files to a model store
  3. Start torchserve using the below command
torchserve --start --model-store model_store --models all
  1. Run the below command to query for running models and observe only a single model is running
curl "http://localhost:8081/models
{
  "models": [
    {
      "modelName": "model_1",
      "modelUrl": "model_1.mar"
    }
  ]
}
  1. Stop torchserve
torchserve --stop
  1. Start torchserve using the below command disabling the snapshots feature
torchserve --start --ncs --model-store model_store --models all
  1. Run the below command to query for running models and observe both models are running
curl "http://localhost:8081/models
{
  "models": [
    {
      "modelName": "model_1",
      "modelUrl": "model_1.mar"
    },
   {
      "modelName": "model_2",
      "modelUrl": "model_2.mar"
    }
  ]
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bigswede74commented, Jul 9, 2020

@harshbafna Thanks for the help.

0reactions
harshbafnacommented, Jul 9, 2020

@harshbafna So I can just clear out this folder to get back to a good state?

Yes. Or if you don’t want to use snapshot feature, just use --ncs to disable it while starting TorchServe 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Models - Hugging Face
The model is set in evaluation mode by default using model. eval() (Dropout modules are deactivated). To train the model, you should first...
Read more >
Models - Django documentation
Models ¶. A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the...
Read more >
How do I save a trained model in PyTorch? - Stack Overflow
There are two main approaches for serializing and restoring a model. The first (recommended) saves and loads only the model parameters:
Read more >
Create a Data Model in Excel - Microsoft Support
Within Excel, Data Models are used transparently, providing tabular data used in PivotTables and PivotCharts. A Data Model is visualized as a collection...
Read more >
SQL models - dbt Developer Hub
sql files (typically in your models directory):. Each .sql file contains one model / select statement; The model name is inherited from the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found