Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added comment for evaluation_id to python examples #860

Merged
merged 3 commits into from Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_image_classification_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_image_object_detection_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -24,6 +24,19 @@ def get_model_evaluation_slice_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_tabular_classification_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_tabular_regression_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -17,8 +17,8 @@
import get_model_evaluation_sample

PROJECT_ID = os.getenv("BUILD_SPECIFIC_GCLOUD_PROJECT")
MODEL_ID = "8842430840248991744" # bq all
EVALUATION_ID = "4944816689650806017" # bq all evaluation
MODEL_ID = "626638064948609024" # bq all
EVALUATION_ID = "3002272024979570688" # bq all evaluation


def test_ucaip_generated_get_model_evaluation_sample(capsys):
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_text_classification_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_text_entity_extraction_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_text_sentiment_analysis_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_video_action_recognition_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_video_classification_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def get_model_evaluation_video_object_tracking_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down
Expand Up @@ -23,6 +23,19 @@ def list_model_evaluation_slices_sample(
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
):
"""
To obtain evaluation_id run the following commands where LOCATION
is the region where the model is stored, PROJECT is the project ID,
and MODEL_ID is the ID of your model.

model_client = aiplatform.gapic.ModelServiceClient(
client_options={
'api_endpoint':'LOCATION-aiplatform.googleapis.com'
}
)
evaluations = model_client.list_model_evaluations(parent='projects/PROJECT/locations/LOCATION/models/MODEL_ID')
print("evaluations:", evaluations)
"""
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
Expand Down