GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.46k stars 6.45k forks source link

feat: (Gen AI) Create a sample for the evaluation/get_rouge_score section #12602

Closed Valeriy-Burlaka closed 1 month ago

Valeriy-Burlaka commented 2 months ago

Description

Adds a sample for the "Get rouge score" section of the model-reference/evaluation Vertex AI page.

Checklist

google-cla[bot] commented 2 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

snippet-bot[bot] commented 2 months ago

Here is the summary of changes.

You are about to add 1 region tag. - [generative_ai/evaluation/get_rouge_score.py:22](https://github.com/Valeriy-Burlaka/python-docs-samples/blob/8187ab64290702f44d3a9b9010cb3ca845e4f492/generative_ai/evaluation/get_rouge_score.py#L22), tag `generativeaionvertexai_evaluation_get_rouge_score`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

Valeriy-Burlaka commented 1 month ago

The py-3.11 build fails on CI because of a "...service out of capacity" error in a different test file:

=================================== FAILURES ===================================
_________________________ test_config_response_schema __________________________
Traceback (most recent call last):
  File "/workspace/generative_ai/.nox/py-3-11/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 76, in error_remapped_callable
    return callable_(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/generative_ai/.nox/py-3-11/lib/python3.11/site-packages/grpc/_channel.py", line 1181, in __call__
    return _end_unary_response_blocking(state, call, False, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/generative_ai/.nox/py-3-11/lib/python3.11/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.RESOURCE_EXHAUSTED
    details = "Unable to submit request because the service is temporarily out of capacity. Try again later."
    debug_error_string = "UNKNOWN:Error received from peer ipv4:173.194.202.95:443 {grpc_message:"Unable to submit request because the service is temporarily out of capacity. Try again later.", grpc_status:8, created_time:"2024-09-26T16:15:43.406844736+00:00"}"
>