GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: Updated docstrings with exception error classes (#894) · googleapis/python-aiplatform@f9aecd2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google/cloud/aiplatform
    • base.py
    • datasets
      • _datasources.py
      • dataset.py
    • explain/metadata/tf
      • v1
        • saved_model_metadata_builder.py
      • v2
        • saved_model_metadata_builder.py
    • jobs.py
    • metadata
      • metadata.py
      • resource.py
    • models.py
    • training_jobs.py
    • utils
      • featurestore_utils.py
      • tensorboard_utils.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/cloud/aiplatform/base.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/base.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def _get_and_validate_project_location(
504504
location(str): The location of the resource noun.
505505
506506
Raises:
507-
RuntimeError if location is different from resource location
507+
RuntimeError: If location is different from resource location
508508
"""
509509

510510
fields = utils.extract_fields_from_resource_name(
@@ -604,7 +604,7 @@ def _assert_gca_resource_is_available(self) -> None:
604604
"""Helper method to raise when property is not accessible.
605605
606606
Raises:
607-
RuntimeError if _gca_resource is has not been created.
607+
RuntimeError: If _gca_resource is has not been created.
608608
"""
609609
if self._gca_resource is None:
610610
raise RuntimeError(
@@ -1115,7 +1115,7 @@ def _wait_for_resource_creation(self) -> None:
11151115
job.run(sync=False, ...)
11161116
job._wait_for_resource_creation()
11171117
Raises:
1118-
RuntimeError if the resource has not been scheduled to be created.
1118+
RuntimeError: If the resource has not been scheduled to be created.
11191119
"""
11201120

11211121
# If the user calls this but didn't actually invoke an API to create
@@ -1141,7 +1141,7 @@ def _assert_gca_resource_is_available(self) -> None:
11411141
resource creation has failed asynchronously.
11421142
11431143
Raises:
1144-
RuntimeError when resource has not been created.
1144+
RuntimeError: When resource has not been created.
11451145
"""
11461146
if not getattr(self._gca_resource, "name", None):
11471147
raise RuntimeError(
Collapse file

‎google/cloud/aiplatform/datasets/_datasources.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/datasets/_datasources.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
"bq://project.dataset.table_name"
7272
7373
Raises:
74-
ValueError if source configuration is not valid.
74+
ValueError: If source configuration is not valid.
7575
"""
7676

7777
dataset_metadata = None
@@ -215,7 +215,7 @@ def create_datasource(
215215
datasource (Datasource)
216216
217217
Raises:
218-
ValueError when below scenarios happen
218+
ValueError: When below scenarios happen:
219219
- import_schema_uri is identified for creating TabularDatasource
220220
- either import_schema_uri or gcs_source is missing for creating NonTabularDatasourceImportable
221221
"""
Collapse file

‎google/cloud/aiplatform/datasets/dataset.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/datasets/dataset.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _validate_metadata_schema_uri(self) -> None:
9191
"""Validate the metadata_schema_uri of retrieved dataset resource.
9292
9393
Raises:
94-
ValueError if the dataset type of the retrieved dataset resource is
94+
ValueError: If the dataset type of the retrieved dataset resource is
9595
not supported by the class.
9696
"""
9797
if self._supported_metadata_schema_uris and (
Collapse file

‎google/cloud/aiplatform/explain/metadata/tf/v1/saved_model_metadata_builder.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/explain/metadata/tf/v1/saved_model_metadata_builder.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(
5050
signature_name) specifies multiple outputs.
5151
5252
Raises:
53-
ValueError if outputs_to_explain contains more than 1 element or
53+
ValueError: If outputs_to_explain contains more than 1 element or
5454
signature contains multiple outputs.
5555
"""
5656
if outputs_to_explain:
Collapse file

‎google/cloud/aiplatform/explain/metadata/tf/v2/saved_model_metadata_builder.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/explain/metadata/tf/v2/saved_model_metadata_builder.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def __init__(
4949
Any keyword arguments to be passed to tf.saved_model.save() function.
5050
5151
Raises:
52-
ValueError if outputs_to_explain contains more than 1 element.
53-
ImportError if tf is not imported.
52+
ValueError: If outputs_to_explain contains more than 1 element.
53+
ImportError: If tf is not imported.
5454
"""
5555
if outputs_to_explain and len(outputs_to_explain) > 1:
5656
raise ValueError(
@@ -91,7 +91,7 @@ def _infer_metadata_entries_from_model(
9191
Inferred input metadata and output metadata from the model.
9292
9393
Raises:
94-
ValueError if specified name is not found in signature outputs.
94+
ValueError: If specified name is not found in signature outputs.
9595
"""
9696

9797
loaded_sig = self._loaded_model.signatures[signature_name]
Collapse file

‎google/cloud/aiplatform/jobs.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/jobs.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ def __init__(
10491049
staging_bucket set in aiplatform.init.
10501050
10511051
Raises:
1052-
RuntimeError is not staging bucket was set using aiplatfrom.init and a staging
1052+
RuntimeError: If staging bucket was not set using aiplatform.init and a staging
10531053
bucket was not passed in.
10541054
"""
10551055

@@ -1241,7 +1241,7 @@ def from_local_script(
12411241
staging_bucket set in aiplatform.init.
12421242
12431243
Raises:
1244-
RuntimeError is not staging bucket was set using aiplatfrom.init and a staging
1244+
RuntimeError: If staging bucket was not set using aiplatform.init and a staging
12451245
bucket was not passed in.
12461246
"""
12471247

Collapse file

‎google/cloud/aiplatform/metadata/metadata.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/metadata/metadata.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def log_metrics(self, metrics: Dict[str, Union[float, int]]):
157157
metrics (Dict):
158158
Required. Metrics key/value pairs. Only flot and int are supported format for value.
159159
Raises:
160-
TypeError if value contains unsupported types.
161-
ValueError if Experiment or Run is not set.
160+
TypeError: If value contains unsupported types.
161+
ValueError: If Experiment or Run is not set.
162162
"""
163163

164164
self._validate_experiment_and_run(method_name="log_metrics")
@@ -265,7 +265,7 @@ def _validate_metrics_value_type(metrics: Dict[str, Union[float, int]]):
265265
metrics (Dict):
266266
Required. Metrics key/value pairs. Only flot and int are supported format for value.
267267
Raises:
268-
TypeError if value contains unsupported types.
268+
TypeError: If value contains unsupported types.
269269
"""
270270

271271
for key, value in metrics.items():
Collapse file

‎google/cloud/aiplatform/metadata/resource.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/metadata/resource.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def _extract_metadata_store_id(resource_name, resource_noun) -> str:
451451
metadata_store_id (str):
452452
The metadata store id for the particular resource name.
453453
Raises:
454-
ValueError if it does not exist.
454+
ValueError: If it does not exist.
455455
"""
456456
pattern = re.compile(
457457
r"^projects\/(?P<project>[\w-]+)\/locations\/(?P<location>[\w-]+)\/metadataStores\/(?P<store>[\w-]+)\/"
Collapse file

‎google/cloud/aiplatform/models.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/models.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def _deploy(
786786
will be executed in concurrent Future and any downstream object will
787787
be immediately returned and synced when the Future has completed.
788788
Raises:
789-
ValueError if there is not current traffic split and traffic percentage
789+
ValueError: If there is not current traffic split and traffic percentage
790790
is not 0 or 100.
791791
"""
792792
_LOGGER.log_action_start_against_resource(
@@ -2366,9 +2366,9 @@ def export_model(
23662366
Details of the completed export with output destination paths to
23672367
the artifacts or container image.
23682368
Raises:
2369-
ValueError if model does not support exporting.
2369+
ValueError: If model does not support exporting.
23702370
2371-
ValueError if invalid arguments or export formats are provided.
2371+
ValueError: If invalid arguments or export formats are provided.
23722372
"""
23732373

23742374
# Model does not support exporting
Collapse file

‎google/cloud/aiplatform/training_jobs.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/training_jobs.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4060,7 +4060,7 @@ def run(
40604060
produce a Vertex AI Model.
40614061
40624062
Raises:
4063-
RuntimeError if Training job has already been run or is waiting to run.
4063+
RuntimeError: If Training job has already been run or is waiting to run.
40644064
"""
40654065

40664066
if model_display_name:
@@ -4269,7 +4269,7 @@ def _run_with_experiments(
42694269
produce a Vertex AI Model.
42704270
42714271
Raises:
4272-
RuntimeError if Training job has already been run or is waiting to run.
4272+
RuntimeError: If Training job has already been run or is waiting to run.
42734273
"""
42744274

42754275
if additional_experiments:

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.