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

feat: LRO metadata #204

Merged
merged 2 commits into from Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 15 additions & 5 deletions .sample_configs/process_configs.yaml
Expand Up @@ -148,11 +148,21 @@ export_data_sample:
resource_name: dataset
export_evaluated_data_items_sample:
resource_name: model_evaluation
export_model_sample: {}
export_model_tabular_classification_sample: {}
export_model_video_action_recognition_sample: {}
export_model_video_classification_sample: {}
export_model_video_object_tracking_sample: {}
export_model_sample:
lro_metadata:
- output_info
export_model_tabular_classification_sample:
lro_metadata:
- output_info
export_model_video_action_recognition_sample:
lro_metadata:
- output_info
export_model_video_classification_sample:
lro_metadata:
- output_info
export_model_video_object_tracking_sample:
lro_metadata:
- output_info
get_annotation_spec_sample: {}
get_batch_prediction_job_sample:
skip:
Expand Down
1 change: 1 addition & 0 deletions samples/snippets/export_model_sample.py
Expand Up @@ -35,6 +35,7 @@ def export_model_sample(
name = client.model_path(project=project, location=location, model=model_id)
response = client.export_model(name=name, output_config=output_config)
print("Long running operation:", response.operation.name)
print("output_info:", response.metadata.output_info)
export_model_response = response.result(timeout=timeout)
print("export_model_response:", export_model_response)

Expand Down
Expand Up @@ -37,6 +37,7 @@ def export_model_tabular_classification_sample(
name = client.model_path(project=project, location=location, model=model_id)
response = client.export_model(name=name, output_config=output_config)
print("Long running operation:", response.operation.name)
print("output_info:", response.metadata.output_info)
export_model_response = response.result(timeout=timeout)
print("export_model_response:", export_model_response)

Expand Down
Expand Up @@ -42,4 +42,4 @@ def test_ucaip_generated_export_model_tabular_classification_sample(capsys):
gcs_destination_output_uri_prefix=f"{GCS_BUCKET}/{GCS_PREFIX}",
)
out, _ = capsys.readouterr()
assert "export_model_response" in out
assert "output_info" in out
Expand Up @@ -38,6 +38,7 @@ def export_model_video_action_recognition_sample(
name = client.model_path(project=project, location=location, model=model_id)
response = client.export_model(name=name, output_config=output_config)
print("Long running operation:", response.operation.name)
print("output_info:", response.metadata.output_info)
export_model_response = response.result(timeout=timeout)
print("export_model_response:", export_model_response)

Expand Down
Expand Up @@ -46,4 +46,4 @@ def test_export_model_video_action_recognition_sample(capsys):
export_format=EXPORT_FORMAT,
)
out, _ = capsys.readouterr()
assert "export_model_response" in out
assert "output_info" in out