MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / get_init_params

Function get_init_params

tensorrt_llm/_utils.py:728–740  ·  view source on GitHub ↗

Get all parameters in object's __init__. Use cls's __init__ as filter if cls provided.

(obj, cls=None)

Source from the content-addressed store, hash-verified

726
727
728def get_init_params(obj, cls=None):
729 """
730 Get all parameters in object's __init__.
731 Use cls's __init__ as filter if cls provided.
732 """
733 names = None
734 if cls is not None:
735 names = set(list(inspect.signature(cls.__init__).parameters)[1:])
736 return {
737 name: getattr(obj, name)
738 for name in list(inspect.signature(obj.__class__.__init__).parameters)
739 [1:] if names is None or name in names
740 }
741
742
743def release_gc():

Callers 10

toMethod · 0.90
quantize_layersFunction · 0.85
smooth_quantize_pluginFunction · 0.85
fp8_rowwise_quantizeFunction · 0.85
qserve_quantizeFunction · 0.85
fuse_gate_mlpFunction · 0.85
unfuse_qkv_gemmFunction · 0.85
fuse_rg_lruFunction · 0.85
set_prompt_tuningFunction · 0.85
parallelize_embeddingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected