class_docstr: This context manager is used for Pytorch Model Inference.
  
  Provide no grad, thread control and autocast context which is for bf16 model.
class_docstr_tok: ["This","context","manager","is","used","for","Pytorch","Model","Inference",".","Provide","no","grad",",","thread","control","and","autocast","context","which","is","for","bf16","model","."]
code: def __exit__(self, exc_type, exc_value, exc_tb):
      self.infer_mode.__exit__(exc_type, exc_value, exc_tb)
      if self.bf16_enable:
          self.autocast.__exit__(exc_type, exc_value, exc_tb)
      self.forecaster.context_enabled = False
  
file_path: BigDL/python/chronos/src/bigdl/chronos/pytorch/context_manager.py
imports: import torch
  from bigdl.chronos.forecaster.utils import set_pytorch_thread
label_desc: Use image node_id 3 for calling the ForecasterContextManager obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, exc_tb) without return types