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.

Cannot warmup with python backend with batch_size

See original GitHub issue

Description

For example config in below.

name: "postprocess"
backend: "python"
max_batch_size: 0
input [
{
    name: "postprocess_in"
    data_type: TYPE_FP32
    dims: [ -1, 581, 2 ]
}
]

output [
{
    name: "postprocess_out"
    data_type: TYPE_FP32
    dims: [ -1 ]
}
]

instance_group [{ kind: KIND_CPU, count: 2 }]

# warmup 2 requests
model_warmup {
  name: "RandomSampleInput"
  batch_size: 256
  inputs [{
      key: "postprocess_in"
      value: {
        data_type: TYPE_FP32
        dims: [1, 581, 2 ]
        random_data: true
      }
   }]
}

Input’s first dim is different with output’s first dim. However I tried to warmup multiple times with batch_size. There is no way to duplicate warmup request.

Error messages

E0520 12:38:18.786236 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0
E0520 12:38:18.786243 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0
E0520 12:38:18.786250 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0
E0520 12:38:18.786257 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0
E0520 12:38:18.786264 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0
E0520 12:38:18.786274 1 triton_model_instance.cc:86] warmup error: Internal - batch size 256 for 'postprocess', max allowed is 0

Triton Information

22.01 ~ 22.04

To Reproduce

Load model with warmup. max_batch_size in model, batch_size in model_warmup

Expected behavior

Model should accept dynamic shape input.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
GuanLuocommented, Jun 15, 2022

Please take a look at https://github.com/triton-inference-server/server/pull/4501 for usage of the new “count” field

1reaction
tanmayv25commented, Jun 1, 2022

model_warmup is a repeated field. If you want to run multiple requests in warmup, just replicate them in your model config.

https://github.com/triton-inference-server/common/blob/main/protobuf/model_config.proto#L1927-L1935

@GuanLuo Will it make sense to add a repeat_count field in model_warmup? The sample will be repeated for that many times before going to the next execution. I believe @kimdwkimdw here is getting confused between batch_size and repeat_count functionality I described.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing KL warmup in tensorflow: tf.keras.backend ...
The problem is that the value of the variable is unstable! It starts close to the desired value at each new epoch, but...
Read more >
How To Fit a Bigger Model and Train It Faster - Hugging Face
This way we can easily increase the overall batch size to numbers that would never fit into the GPU's memory. In turn, however,...
Read more >
SentenceTransformer — Sentence-Transformers documentation
batch_size – the batch size used for the computation ... For WarmupLinear (default), the learning rate is increased from o up to the...
Read more >
Benchmarking Scikit-Learn against JPMML-Evaluator in Java ...
The high-level business logic is implemented in Python. ... <path to PMML file> <path to CSV file> "Java" <warm-up batch size>.
Read more >
How to Update LSTM Networks During Training for Time ...
How to Setup a Python Environment for Machine Learning and Deep Learning ... Transform the time series into a supervised learning problem.
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