MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / get_engine_version

Function get_engine_version

tensorrt_llm/builder.py:748–757  ·  view source on GitHub ↗
(engine_dir: str)

Source from the content-addressed store, hash-verified

746
747
748def get_engine_version(engine_dir: str) -> Union[None, str]:
749 engine_dir = Path(engine_dir)
750 config_path = engine_dir / "config.json"
751 with open(config_path, 'r') as f:
752 config = json.load(f)
753
754 if 'version' not in config:
755 return None
756
757 return config['version']
758
759
760def optimize_model_with_config(model: PretrainedModel,

Callers 2

read_model_nameFunction · 0.90
from_dirMethod · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected