MCPcopy
hub / github.com/InternLM/lmdeploy / try_import_deeplink

Function try_import_deeplink

lmdeploy/utils.py:461–474  ·  view source on GitHub ↗
(device_type: str)

Source from the content-addressed store, hash-verified

459
460
461def try_import_deeplink(device_type: str):
462 deeplink_device_type_list = [
463 'ascend',
464 'npu',
465 'maca',
466 'camb',
467 ]
468 if device_type in deeplink_device_type_list:
469 try:
470 import dlinfer.framework.lmdeploy_ext # noqa: F401
471 except Exception as e:
472 logger = get_logger('lmdeploy')
473 logger.error(f'{type(e).__name__}: {e}')
474 exit(1)
475
476
477def serialize_state_dict(state_dict: dict) -> str:

Callers 6

__init__Method · 0.90
smooth_quantFunction · 0.90
auto_awqFunction · 0.90
__init__Method · 0.90
_main_loopMethod · 0.90
checkMethod · 0.90

Calls 1

get_loggerFunction · 0.85

Tested by

no test coverage detected