class_docstr: Base container for ONNX models.
  The container allows to mirror the Sklearn API.
class_docstr_tok: ["Base","container","for","ONNX","models",".","The","container","allows","to","mirror","the","Sklearn","API","."]
code: def __init__(
      self, model, n_threads=None, batch_size=None, extra_config={}
  ):
      super(ONNXSklearnContainer, self).__init__(
          model, n_threads, batch_size, extra_config
      )
  
      assert (
          onnx_runtime_installed()
      ), "ONNX Container requires ONNX runtime installed."
  
      sess_options = ort.SessionOptions()
      if self._n_threads is not None:
          sess_options.intra_op_num_threads = self._n_threads
          sess_options.inter_op_num_threads = 1
          sess_options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
      self._session = ort.InferenceSession(
          self._model.SerializeToString(), sess_options=sess_options
      )
      self._output_names = [
          self._session.get_outputs()[i].name
          for i in range(len(self._session.get_outputs()))
      ]
      self._input_names = [
          input.name for input in self._session.get_inputs()
      ]
      self._extra_config = extra_config
  
imports: import pickle
  import os
  import numpy
  import shutil
  import torch
  import warnings
  import hummingbird
  from hummingbird.ml._utils import onnx_runtime_installed, from_strings_to_ints, dump_versions, check_dumped_versions
  from hummingbird.ml.operator_converters import constants
  from hummingbird.ml.containers._sklearn_api_containers import SklearnContainer, SklearnContainerTransformer, SklearnContainerRegression, SklearnContainerClassification, SklearnContainerAnomalyDetection
  import onnx
label_desc: Use image node_id 1 to create a new ONNXSklearnContainer object from inherited base classes: SklearnContainer with example: obj = ONNXSklearnContainer(model, n_threads, batch_size, extra_config)