class_docstr: Auto configuration.
class_docstr_tok: ["Auto","configuration","."]
docstr: Auto configuration to run with local GPU.
  
  Args:
      device (`int`): the number of GPU device, defaults to 0.
  
  Examples:
      >>> from towhee import pipe, AutoConfig
      >>> p = (pipe.input('url')
      ...          .map('url', 'image', ops.image_decode.cv2())
      ...          .map('image', 'vec', ops.image_embedding.timm(model_name='resnet50'), config=AutoConfig.LocalGPUConfig())
      ...          .output('vec')
      ... )
docstr_tok: ["Auto","configuration","to","run","with","local","GPU",".","Args",":","device","(","`","int","`",")",":","the","number","of","GPU","device",",","defaults","to","0",".","Examples",":",">",">",">","from","towhee","import","pipe",",","AutoConfig",">",">",">","p","=","(","pipe.input","(","'url","'",")","...",".map","(","'url","'",",","'image","'",",","ops.image_decode.cv2","(",")",")","...",".map","(","'image","'",",","'vec","'",",","ops.image_embedding.timm","(","model_name='resnet50","'",")",",","config=AutoConfig.LocalGPUConfig","(",")",")","...",".output","(","'vec","'",")","...",")"]
code: def LocalGPUConfig(device: int = 0):
      """
      Auto configuration to run with local GPU.
  
      Args:
          device (`int`): the number of GPU device, defaults to 0.
  
      Examples:
          >>> from towhee import pipe, AutoConfig
          >>> p = (pipe.input('url')
          ...          .map('url', 'image', ops.image_decode.cv2())
          ...          .map('image', 'vec', ops.image_embedding.timm(model_name='resnet50'), config=AutoConfig.LocalGPUConfig())
          ...          .output('vec')
          ... )
      """
      return nd_conf.TowheeConfig.set_local_config(device=device)
  
file_path: towhee/towhee/runtime/auto_config.py
imports: import threading
  from functools import wraps
  import contextvars
  import contextlib
  import towhee.runtime.pipeline_loader
  import towhee.runtime.node_config
  from towhee.utils.log import engine_log
label_desc: Use image node_id 5 for calling the AutoConfig obj's underlying member method code with example usage: obj.LocalGPUConfig(device) and returns: nd_conf