onnxruntime_backend icon indicating copy to clipboard operation
onnxruntime_backend copied to clipboard

onnx disabled optimizers for dropout

Open zhaozhiming37 opened this issue 2 years ago • 5 comments

My model includes Dropout module for inference, and when I run my model by onnxruntime locally, I will set disabled_optimizers=["EliminateDropout"]. And I want to know how can I do that by triton server? My code is like this:

session = ort.InferenceSession(
        onnxFile,
        disabled_optimizers=["EliminateDropout"],
        providers=[
            'TensorrtExecutionProvider',
            # 'CUDAExecutionProvider',
            # 'CPUExecutionProvider'
        ]
    )

zhaozhiming37 avatar Nov 11 '22 07:11 zhaozhiming37

I don't know whether we expose this parameter in the model configuration. @pranavsharma Do you know whether it is possible to use this option when serving the models using onnxruntime backend?

Tabrizian avatar Nov 14 '22 04:11 Tabrizian

@pranavsharma Hi, is there an update on my question?

zhaozhiming37 avatar May 18 '23 08:05 zhaozhiming37

@Tabrizian Hi, I wonder if there is an answer to the question or if you have plans to support?

zhaozhiming37 avatar May 19 '23 06:05 zhaozhiming37

Hi @zhaozhiming37, sorry for the delayed resposne. ONNXRuntime backend is managed by the Microsoft team so they should be able to provide more info.

Tabrizian avatar Jun 23 '23 20:06 Tabrizian

This has not been exposed yet. The best way to do this is to create the session offline and serialize it and then use the serialized ONNX model in Triton.

pranavsharma avatar Jun 23 '23 23:06 pranavsharma