From 9b6bc49b6e1f1ef836bff2432a9d51f3ab4414ad Mon Sep 17 00:00:00 2001 From: Jah-yee <166608075+Jah-yee@users.noreply.github.com> Date: Thu, 5 Nov 2026 10:21:24 +0800 Subject: [PATCH] fix: correct spelling mistakes in vertexai docstrings and comments --- .../cloud/aiplatform/datasets/image_dataset.py | 2 +- google/cloud/aiplatform/datasets/text_dataset.py | 2 +- .../cloud/aiplatform/datasets/video_dataset.py | 2 +- google/cloud/aiplatform/utils/__init__.py | 2 +- .../generative_models/_function_calling_utils.py | 2 +- vertexai/generative_models/_generative_models.py | 6 +++--- .../_evaluatable_language_models.py | 2 +- vertexai/language_models/_language_models.py | 14 +++++++------- .../preview/ml_monitoring/model_monitors.py | 16 ++++++++-------- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/google/cloud/aiplatform/datasets/image_dataset.py b/google/cloud/aiplatform/datasets/image_dataset.py index f8a232b780..0a7e8a02c5 100644 --- a/google/cloud/aiplatform/datasets/image_dataset.py +++ b/google/cloud/aiplatform/datasets/image_dataset.py @@ -108,7 +108,7 @@ def create( compared using their binary data (bytes), not on their content. If annotation labels are referenced in a schema specified by the `import_schema_url` parameter, then the labels in the - `data_item_labels` dictionary are overriden by the annotations. + `data_item_labels` dictionary are overridden by the annotations. project (str): Optional. The name of the Google Cloud project to which this `ImageDataset` is uploaded. This overrides the project that diff --git a/google/cloud/aiplatform/datasets/text_dataset.py b/google/cloud/aiplatform/datasets/text_dataset.py index 8b47d987f9..34d2d6c5f0 100644 --- a/google/cloud/aiplatform/datasets/text_dataset.py +++ b/google/cloud/aiplatform/datasets/text_dataset.py @@ -118,7 +118,7 @@ def create( compared using their binary data (bytes), not on their content. If annotation labels are referenced in a schema specified by the `import_schema_url` parameter, then the labels in the - `data_item_labels` dictionary are overriden by the annotations. + `data_item_labels` dictionary are overridden by the annotations. project (str): Optional. The name of the Google Cloud project to which this `TextDataset` is uploaded. This overrides the project that diff --git a/google/cloud/aiplatform/datasets/video_dataset.py b/google/cloud/aiplatform/datasets/video_dataset.py index d67f4aa608..c66b8424bb 100644 --- a/google/cloud/aiplatform/datasets/video_dataset.py +++ b/google/cloud/aiplatform/datasets/video_dataset.py @@ -111,7 +111,7 @@ def create( compared using their binary data (bytes), not on their content. If annotation labels are referenced in a schema specified by the `import_schema_url` parameter, then the labels in the - `data_item_labels` dictionary are overriden by the annotations. + `data_item_labels` dictionary are overridden by the annotations. project (str): The name of the Google Cloud project to which this `VideoDataset` is uploaded. This overrides the project that diff --git a/google/cloud/aiplatform/utils/__init__.py b/google/cloud/aiplatform/utils/__init__.py index 0ee79d0c37..5d0df22171 100644 --- a/google/cloud/aiplatform/utils/__init__.py +++ b/google/cloud/aiplatform/utils/__init__.py @@ -731,7 +731,7 @@ class FeatureOnlineStoreClientWithOverride(ClientWithOverride): class FeatureRegistryClientWithOverride(ClientWithOverride): """Adds function override for client classes to support new Feature Store. - `feature_path()` and `parse_feature_path()` are overriden here to compensate + `feature_path()` and `parse_feature_path()` are overridden here to compensate for the auto-generated GAPIC class which only supports Feature Store Legacy's feature paths. """ diff --git a/vertexai/generative_models/_function_calling_utils.py b/vertexai/generative_models/_function_calling_utils.py index 80e5d3d68b..c1639aad70 100644 --- a/vertexai/generative_models/_function_calling_utils.py +++ b/vertexai/generative_models/_function_calling_utils.py @@ -55,7 +55,7 @@ def _generate_json_schema_from_function_using_pydantic( function_description = func.__doc__ # Parse parameter descriptions from the docstring. - # Also parse the function descripton in a better way. + # Also parse the function description in a better way. parameter_descriptions = {} if docstring_parser: parsed_docstring = docstring_parser.parse(func.__doc__) diff --git a/vertexai/generative_models/_generative_models.py b/vertexai/generative_models/_generative_models.py index c41f2802a0..ff9c6df586 100644 --- a/vertexai/generative_models/_generative_models.py +++ b/vertexai/generative_models/_generative_models.py @@ -209,7 +209,7 @@ def _reconcile_model_name(model_name: str, project: str, location: str) -> str: else: raise ValueError( "model_name must be either a Model Garden model ID or a full resource name." - f"recieved model_name {model_name}" + f"received model_name {model_name}" ) @@ -1162,7 +1162,7 @@ def start_chat( is incomplete due to going over the max token limit. If set to `False`, the chat session history will always accumulate the request and response messages even if the - reponse if blocked or incomplete. This can result in an unusable + response if blocked or incomplete. This can result in an unusable chat session state. Returns: @@ -1797,7 +1797,7 @@ def __init__( max_output_tokens: The maximum number of output tokens to generate per message. stop_sequences: A list of stop sequences. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. Range: [-2.0, 2.0] + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated text, thus decreasing the possibility of repeating the same content. Range: [-2.0, 2.0] response_mime_type: Output response mimetype of the generated diff --git a/vertexai/language_models/_evaluatable_language_models.py b/vertexai/language_models/_evaluatable_language_models.py index d6e8c03db7..ebbcd78c89 100644 --- a/vertexai/language_models/_evaluatable_language_models.py +++ b/vertexai/language_models/_evaluatable_language_models.py @@ -230,7 +230,7 @@ class EvaluationTextSummarizationSpec(_EvaluationTaskSpec): @dataclasses.dataclass class _EvaluationMetricBase: - """Base class for returned evaulation metrics.""" + """Base class for returned evaluation metrics.""" @property def input_dataset_paths(self) -> str: diff --git a/vertexai/language_models/_language_models.py b/vertexai/language_models/_language_models.py index 79880b0937..814896efcd 100644 --- a/vertexai/language_models/_language_models.py +++ b/vertexai/language_models/_language_models.py @@ -1377,7 +1377,7 @@ def predict( The maximum value for `logprobs` is 5. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated @@ -1466,7 +1466,7 @@ async def predict_async( The maximum value for `logprobs` is 5. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated @@ -1547,7 +1547,7 @@ def predict_streaming( The maximum value for `logprobs` is 5. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated @@ -1633,7 +1633,7 @@ async def predict_streaming_async( The maximum value for `logprobs` is 5. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated @@ -1727,7 +1727,7 @@ def _create_text_generation_prediction_request( The maximum value for `logprobs` is 5. presence_penalty: Positive values penalize tokens that have appeared in the generated text, - thus increasing the possibility of generating more diversed topics. + thus increasing the possibility of generating more diverse topics. Range: [-2.0, 2.0] frequency_penalty: Positive values penalize tokens that repeatedly appear in the generated @@ -1831,7 +1831,7 @@ def _parse_text_generation_model_multi_candidate_response( """Converts the raw text_generation model response to `MultiCandidateTextGenerationResponse`.""" # The contract for the PredictionService is that there is a 1:1 mapping # between request `instances` and response `predictions`. - # Unfortunetely, the text-bison models violate this contract. + # Unfortunately, the text-bison models violate this contract. prediction_count = len(prediction_response.predictions) candidates = [] @@ -3299,7 +3299,7 @@ def __init__( class CodeChatSession(_ChatSessionBase): """CodeChatSession represents a chat session with code chat language model. - Within a code chat session, the model keeps context and remembers the previous converstion. + Within a code chat session, the model keeps context and remembers the previous conversation. """ __module__ = "vertexai.language_models" diff --git a/vertexai/resources/preview/ml_monitoring/model_monitors.py b/vertexai/resources/preview/ml_monitoring/model_monitors.py index 2719256222..55521dd86c 100644 --- a/vertexai/resources/preview/ml_monitoring/model_monitors.py +++ b/vertexai/resources/preview/ml_monitoring/model_monitors.py @@ -482,19 +482,19 @@ def create( data form the dataset. tabular_objective_spec (objective.TabularObjective): Optional. The default tabular monitoring objective spec for - the model monitor. It can be overriden in the ModelMonitoringJob + the model monitor. It can be overridden in the ModelMonitoringJob objective spec. output_spec (output.OutputSpec): Optional. The default monitoring metrics/logs export spec, it - can be overriden in the ModelMonitoringJob output spec. + can be overridden in the ModelMonitoringJob output spec. If not specified, a default Google Cloud Storage bucket will be created under your project. notification_spec (notification.NotificationSpec): Optional. The default notification spec for monitoring result. - It can be overriden in the ModelMonitoringJob notification spec. + It can be overridden in the ModelMonitoringJob notification spec. explanation_spec (explanation.ExplanationSpec): Optional. The default explanation spec for feature attribution - monitoring. It can be overriden in the ModelMonitoringJob + monitoring. It can be overridden in the ModelMonitoringJob explanation spec. project (str): Optional. Project to retrieve model monitor from. If not set, @@ -608,17 +608,17 @@ def update( extract data form the dataset. tabular_objective_spec (objective.TabularObjective): Optional. The default tabular monitoring objective spec for - the model monitor. It can be overriden in the ModelMonitoringJob + the model monitor. It can be overridden in the ModelMonitoringJob objective spec. output_spec (output.OutputSpec): Optional. The default monitoring metrics/logs export spec, it - can be overriden in the ModelMonitoringJob output spec. + can be overridden in the ModelMonitoringJob output spec. notification_spec (notification.NotificationSpec): Optional. The default notification spec for monitoring result. - It can be overriden in the ModelMonitoringJob notification spec. + It can be overridden in the ModelMonitoringJob notification spec. explanation_spec (explanation.ExplanationSpec): Optional. The default explanation spec for feature attribution - monitoring. It can be overriden in the ModelMonitoringJob + monitoring. It can be overridden in the ModelMonitoringJob explanation spec. Returns: