Skip to content

Commit

Permalink
feat: LRO metadata (#204)
Browse files Browse the repository at this point in the history
* chore: release 0.5.0

Release-As: 0.5.0

* feat: update export model examples to print operation.metadata.output_info
  • Loading branch information
dizcology committed Feb 8, 2021
1 parent f5839f8 commit 2863dc0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
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

0 comments on commit 2863dc0

Please sign in to comment.