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: Added comment for evaluation_id to python examples (#860) · ccubc/python-aiplatform@004bf5f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • samples/snippets/model_service
    • get_model_evaluation_image_classification_sample.py
    • get_model_evaluation_image_object_detection_sample.py
    • get_model_evaluation_slice_sample.py
    • get_model_evaluation_tabular_classification_sample.py
    • get_model_evaluation_tabular_regression_sample.py
    • get_model_evaluation_tabular_regression_sample_test.py
    • get_model_evaluation_text_classification_sample.py
    • get_model_evaluation_text_entity_extraction_sample.py
    • get_model_evaluation_text_sentiment_analysis_sample.py
    • get_model_evaluation_video_action_recognition_sample.py
    • get_model_evaluation_video_classification_sample.py
    • get_model_evaluation_video_object_tracking_sample.py
    • list_model_evaluation_slices_sample.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎samples/snippets/model_service/get_model_evaluation_image_classification_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_image_classification_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_image_classification_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_image_object_detection_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_image_object_detection_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_image_object_detection_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_slice_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_slice_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ def get_model_evaluation_slice_sample(
2424
location: str = "us-central1",
2525
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2626
):
27+
"""
28+
To obtain evaluation_id run the following commands where LOCATION
29+
is the region where the model is stored, PROJECT is the project ID,
30+
and MODEL_ID is the ID of your model.
31+
32+
model_client = aiplatform.gapic.ModelServiceClient(
33+
client_options={
34+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
35+
}
36+
)
37+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
38+
print("evaluations:", evaluations)
39+
"""
2740
# The AI Platform services require regional API endpoints.
2841
client_options = {"api_endpoint": api_endpoint}
2942
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_tabular_classification_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_tabular_classification_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_tabular_classification_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_tabular_regression_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_tabular_regression_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_tabular_regression_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_tabular_regression_sample_test.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_tabular_regression_sample_test.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import get_model_evaluation_sample
1818

1919
PROJECT_ID = os.getenv("BUILD_SPECIFIC_GCLOUD_PROJECT")
20-
MODEL_ID = "8842430840248991744" # bq all
21-
EVALUATION_ID = "4944816689650806017" # bq all evaluation
20+
MODEL_ID = "626638064948609024" # bq all
21+
EVALUATION_ID = "3002272024979570688" # bq all evaluation
2222

2323

2424
def test_ucaip_generated_get_model_evaluation_sample(capsys):
Collapse file

‎samples/snippets/model_service/get_model_evaluation_text_classification_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_text_classification_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_text_classification_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_text_entity_extraction_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_text_entity_extraction_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_text_entity_extraction_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_text_sentiment_analysis_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_text_sentiment_analysis_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_text_sentiment_analysis_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.
Collapse file

‎samples/snippets/model_service/get_model_evaluation_video_action_recognition_sample.py‎

Copy file name to clipboardExpand all lines: samples/snippets/model_service/get_model_evaluation_video_action_recognition_sample.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ def get_model_evaluation_video_action_recognition_sample(
2323
location: str = "us-central1",
2424
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
2525
):
26+
"""
27+
To obtain evaluation_id run the following commands where LOCATION
28+
is the region where the model is stored, PROJECT is the project ID,
29+
and MODEL_ID is the ID of your model.
30+
31+
model_client = aiplatform.gapic.ModelServiceClient(
32+
client_options={
33+
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
34+
}
35+
)
36+
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
37+
print("evaluations:", evaluations)
38+
"""
2639
# The AI Platform services require regional API endpoints.
2740
client_options = {"api_endpoint": api_endpoint}
2841
# Initialize client that will be used to create and send requests.

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.