[Doc]: fix typos in Python comments (#24093)

Signed-off-by: Didier Durand <durand.didier@gmail.com>
This commit is contained in:
Didier Durand
2025-09-02 21:05:45 -07:00
committed by GitHub
parent c4ed78b14f
commit d7e1e59972
15 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ def get_adapter_absolute_path(lora_path: str) -> str:
except (HfHubHTTPError, RepositoryNotFoundError, EntryNotFoundError,
HFValidationError):
# Handle errors that may occur during the download
# Return original path instead instead of throwing error here
# Return original path instead of throwing error here
logger.exception("Error downloading the HuggingFace model")
return lora_path
@@ -94,7 +94,7 @@ def find_matched_target(
config that a layer corresponds to.
Recall that a compressed-tensors configs has a concept of
config_groups, where each layer can be quantized with with a different
config_groups, where each layer can be quantized with a different
scheme.
targets in each config_group will be a list of either layer names
+5 -5
View File
@@ -213,7 +213,7 @@ class MediaConnector:
image_mode: str = "RGB",
) -> Image.Image:
"""
Load a PIL image from a HTTP or base64 data URL.
Load a PIL image from an HTTP or base64 data URL.
By default, the image is converted into RGB format.
"""
@@ -237,7 +237,7 @@ class MediaConnector:
image_mode: str = "RGB",
) -> Image.Image:
"""
Asynchronously load a PIL image from a HTTP or base64 data URL.
Asynchronously load a PIL image from an HTTP or base64 data URL.
By default, the image is converted into RGB format.
"""
@@ -261,7 +261,7 @@ class MediaConnector:
image_mode: str = "RGB",
) -> tuple[npt.NDArray, dict[str, Any]]:
"""
Load video from a HTTP or base64 data URL.
Load video from an HTTP or base64 data URL.
"""
image_io = ImageMediaIO(image_mode=image_mode,
**self.media_io_kwargs.get("image", {}))
@@ -281,7 +281,7 @@ class MediaConnector:
image_mode: str = "RGB",
) -> tuple[npt.NDArray, dict[str, Any]]:
"""
Asynchronously load video from a HTTP or base64 data URL.
Asynchronously load video from an HTTP or base64 data URL.
By default, the image is converted into RGB format.
"""
@@ -370,7 +370,7 @@ def group_mm_inputs_by_modality(
def modality_group_func(
mm_input: MultiModalKwargsItems) -> Union[str, int]:
# If the input has multiple modalities, return a id as the unique key
# If the input has multiple modalities, return an id as the unique key
# for the mm_input input.
if len(mm_input) > 1:
return id(mm_input)
+1 -1
View File
@@ -709,7 +709,7 @@ def reorder_batch_to_split_decodes_and_prefills(
for i, req_id in enumerate(input_batch.req_ids):
num_tokens = scheduler_output.num_scheduled_tokens[req_id]
# for now treat 1 scheduled token as "decode" even if its not,
# for now treat 1 scheduled token as "decode" even if it's not,
# we should update this to something like < 8 in the future but
# currently the TritonMLA._forward_decode only supports
# num_tokens = 1
+2 -2
View File
@@ -65,9 +65,9 @@ def get_outlines_cache_path() -> str:
elif xdg_cache_home:
return os.path.join(xdg_cache_home, ".cache", "outlines")
# If homedir is "/", we may be inside a container, and thus writing to
# root would be problematic, so we fallback to using a tempfile.
# root would be problematic, so we fall back to using a tempfile.
# Also validate the path exists, since os.path.expanduser does
# not garuntee existence.
# not guarantee existence.
elif os.path.isdir(home_dir) and home_dir != "/":
# Default Unix fallback: ~/.cache/outlines
return os.path.join(home_dir, ".cache", "outlines")
+1 -1
View File
@@ -250,7 +250,7 @@ class TPUWorker:
scheduler_output: "SchedulerOutput",
) -> Optional[ModelRunnerOutput]:
output = self.model_runner.execute_model(scheduler_output)
# every worker's output is needed when kv_transfer_group is setup
# every worker's output is needed when kv_transfer_group is set up
return output if self.is_driver_worker or has_kv_transfer_group(
) else None