@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / c016047ed7
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 06:00 UTC

Fix docs/mkdocs/hooks/remove_announcement.py (#19382)

Harry Mellor committed Jun 10, 2025 at 05:36 UTC c016047ed7bc5b634384f91c187d90d0bdcb87e9
1 file changed +4 -4
docs/mkdocs/hooks/remove_announcement.py
+4 -4
@@ -1,6 +1,7 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 import os
4 +from pathlib import Path
5 from typing import Literal
6
7
@@ -8,10 +9,9 @@ def on_startup(command: Literal["build", "gh-deploy", "serve"], dirty: bool):
9 # see https://docs.readthedocs.io/en/stable/reference/environment-variables.html # noqa
10 if os.getenv('READTHEDOCS_VERSION_TYPE') == "tag":
11 # remove the warning banner if the version is a tagged release
11 - docs_dir = os.path.dirname(__file__)
12 - announcement_path = os.path.join(docs_dir,
13 - "mkdocs/overrides/main.html")
12 + mkdocs_dir = Path(__file__).parent.parent
13 + announcement_path = mkdocs_dir / "overrides/main.html"
14 # The file might be removed already if the build is triggered multiple
15 # times (readthedocs build both HTML and PDF versions separately)
16 - if os.path.exists(announcement_path):
16 + if announcement_path.exists():
17 os.remove(announcement_path)