NVIDIA / NVIDIA/TensorRT-LLM

[Doc]: Missing docstrings for CachedModelLoader methods in tensorrt_llm/llmapi/llm_utils.py

Open
#17,718 0 comments 0 reactions 1 assignee View on GitHub

@nv-guomingz is already working on this.

Since Aug 14, 2026.

Doc
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

📚 The doc issue

The CachedModelLoader class in tensorrt_llm/llmapi/llm_utils.py is missing docstrings on four of its members, while the neighboring ModelLoader class and the module-level helper functions in the same file are documented.

Undocumented members:

  • CachedModelLoader.__init__
  • CachedModelLoader.workspace (property)
  • CachedModelLoader._submit_to_all_workers
  • CachedModelLoader.__call__

__call__ in particular carries non-obvious behavior worth documenting: it downloads the speculative model when one is configured, short-circuits for the _autodeploy backend, and returns a (None, hf_model_dir) tuple whose first element is always None. Readers currently have to trace the body to learn any of this.

This is a documentation-only gap; no functional change is involved.

Suggest a potential alternative/fix

Add Google-style docstrings to the four members listed above, matching the style already used by ModelLoader and the module-level helpers in the same file.

I'd like to work on this and open a PR.

Before submitting a new issue...
  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.