Showing build.log
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
[14:40:29 PST] Transferring environment variable script to build VM
[14:40:30 PST] Transferring kokoro_log_reader.py to build VM
[14:40:32 PST] Transferring source code to build VM
[14:40:47 PST] Executing build script on build VM
[ID: 4423524] Executing command via SSH:
export KOKORO_BUILD_NUMBER="3178"
export KOKORO_JOB_NAME="cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system"
source /tmpfs/kokoro-env_vars.sh; cd /tmpfs/src/ ; chmod 755 github/python-aiplatform/.kokoro/trampoline.sh ; PYTHON_3_VERSION="$(pyenv which python3 2> /dev/null || which python3)" ; PYTHON_2_VERSION="$(pyenv which python2 2> /dev/null || which python2)" ; if "$PYTHON_3_VERSION" -c "import psutil" ; then KOKORO_PYTHON_COMMAND="$PYTHON_3_VERSION" ; else KOKORO_PYTHON_COMMAND="$PYTHON_2_VERSION" ; fi > /dev/null 2>&1 ; echo "export KOKORO_PYTHON_COMMAND="$KOKORO_PYTHON_COMMAND"" > "$HOME/.kokoro_python_vars" ; nohup bash -c "( rm -f /tmpfs/kokoro_build_exit_code ; github/python-aiplatform/.kokoro/trampoline.sh ; echo \${PIPESTATUS[0]} > /tmpfs/kokoro_build_exit_code ) > /tmpfs/kokoro_build.log 2>&1" > /dev/null 2>&1 & echo $! > /tmpfs/kokoro_build.pid ; source "$HOME/.kokoro_python_vars" ; "$KOKORO_PYTHON_COMMAND" /tmpfs/kokoro_log_reader.py /tmpfs/kokoro_build.log /tmpfs/kokoro_build_exit_code /tmpfs/kokoro_build.pid /tmpfs/kokoro_log_reader.pid --start_byte 0
2024-12-01 14:40:48 Creating folder on disk for secrets: /tmpfs/src/gfile/secret_manager
Activated service account credentials for: [kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com]
WARNING: Your config file at [/home/kbuilder/.docker/config.json] contains these credential helper entries:
{
"credHelpers": {
"gcr.io": "gcr",
"us.gcr.io": "gcr",
"asia.gcr.io": "gcr",
"staging-k8s.gcr.io": "gcr",
"eu.gcr.io": "gcr"
}
}
These will be overwritten.
Docker configuration file updated.
Using default tag: latest
latest: Pulling from cloud-devrel-kokoro-resources/python-multi
ff65ddf9395b: Pulling fs layer
cdd9d79692c1: Pulling fs layer
e4862826b2aa: Pulling fs layer
d32630687f55: Pulling fs layer
dfa7816fe874: Pulling fs layer
0a8e089113ba: Pulling fs layer
d8c355139ad8: Pulling fs layer
cf2983c386f5: Pulling fs layer
f1826a77298e: Pulling fs layer
046f509f9618: Pulling fs layer
8614918c0f65: Pulling fs layer
4f8e6ed8e976: Pulling fs layer
42d703dfe78c: Pulling fs layer
d32630687f55: Waiting
3e6bd4022c16: Pulling fs layer
1faa0020373d: Pulling fs layer
0dbbcabd03ab: Pulling fs layer
dfa7816fe874: Waiting
3f7572e2d709: Pulling fs layer
017bd45224e3: Pulling fs layer
0a8e089113ba: Waiting
14922c403bfb: Pulling fs layer
137985dae17e: Pulling fs layer
c13dd2a78d7b: Pulling fs layer
946b68838e6d: Pulling fs layer
8c9cccb372af: Pulling fs layer
11221cca7dfc: Pulling fs layer
1c462c293704: Pulling fs layer
d8c355139ad8: Waiting
137985dae17e: Waiting
cf2983c386f5: Waiting
0dbbcabd03ab: Waiting
f1826a77298e: Waiting
c13dd2a78d7b: Waiting
3f7572e2d709: Waiting
046f509f9618: Waiting
946b68838e6d: Waiting
017bd45224e3: Waiting
8614918c0f65: Waiting
8c9cccb372af: Waiting
14922c403bfb: Waiting
4f8e6ed8e976: Waiting
11221cca7dfc: Waiting
1faa0020373d: Waiting
1c462c293704: Waiting
42d703dfe78c: Waiting
3e6bd4022c16: Waiting
e4862826b2aa: Verifying Checksum
e4862826b2aa: Download complete
d32630687f55: Verifying Checksum
d32630687f55: Download complete
ff65ddf9395b: Verifying Checksum
ff65ddf9395b: Download complete
dfa7816fe874: Verifying Checksum
dfa7816fe874: Download complete
0a8e089113ba: Verifying Checksum
0a8e089113ba: Download complete
cf2983c386f5: Verifying Checksum
cf2983c386f5: Download complete
ff65ddf9395b: Pull complete
d8c355139ad8: Verifying Checksum
d8c355139ad8: Download complete
046f509f9618: Verifying Checksum
046f509f9618: Download complete
cdd9d79692c1: Download complete
8614918c0f65: Verifying Checksum
8614918c0f65: Download complete
4f8e6ed8e976: Verifying Checksum
4f8e6ed8e976: Download complete
42d703dfe78c: Verifying Checksum
42d703dfe78c: Download complete
1faa0020373d: Verifying Checksum
1faa0020373d: Download complete
3e6bd4022c16: Verifying Checksum
3e6bd4022c16: Download complete
0dbbcabd03ab: Verifying Checksum
0dbbcabd03ab: Download complete
3f7572e2d709: Verifying Checksum
3f7572e2d709: Download complete
017bd45224e3: Verifying Checksum
017bd45224e3: Download complete
137985dae17e: Verifying Checksum
137985dae17e: Download complete
14922c403bfb: Verifying Checksum
14922c403bfb: Download complete
c13dd2a78d7b: Verifying Checksum
c13dd2a78d7b: Download complete
f1826a77298e: Verifying Checksum
f1826a77298e: Download complete
946b68838e6d: Verifying Checksum
946b68838e6d: Download complete
1c462c293704: Verifying Checksum
1c462c293704: Download complete
11221cca7dfc: Verifying Checksum
11221cca7dfc: Download complete
8c9cccb372af: Verifying Checksum
8c9cccb372af: Download complete
cdd9d79692c1: Pull complete
e4862826b2aa: Pull complete
d32630687f55: Pull complete
dfa7816fe874: Pull complete
0a8e089113ba: Pull complete
d8c355139ad8: Pull complete
cf2983c386f5: Pull complete
f1826a77298e: Pull complete
046f509f9618: Pull complete
8614918c0f65: Pull complete
4f8e6ed8e976: Pull complete
42d703dfe78c: Pull complete
3e6bd4022c16: Pull complete
1faa0020373d: Pull complete
0dbbcabd03ab: Pull complete
3f7572e2d709: Pull complete
017bd45224e3: Pull complete
14922c403bfb: Pull complete
137985dae17e: Pull complete
c13dd2a78d7b: Pull complete
946b68838e6d: Pull complete
8c9cccb372af: Pull complete
11221cca7dfc: Pull complete
1c462c293704: Pull complete
Digest: sha256:9bb9bd3cd602cf04a361ef46d2f32e514ed06ab856e0fb889349572ec028d89a
Status: Downloaded newer image for gcr.io/cloud-devrel-kokoro-resources/python-multi:latest
gcr.io/cloud-devrel-kokoro-resources/python-multi:latest
Executing: docker run --rm --interactive --network=host --privileged --volume=/var/run/docker.sock:/var/run/docker.sock --workdir=/tmpfs/src --entrypoint=github/python-aiplatform/.kokoro/build.sh --env-file=/tmpfs/tmp/tmpdiq_n1km/envfile --volume=/tmpfs:/tmpfs gcr.io/cloud-devrel-kokoro-resources/python-multi
KOKORO_KEYSTORE_DIR=/tmpfs/src/keystore
KOKORO_GITHUB_COMMIT_URL=https://github.com/googleapis/python-aiplatform/commit/b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_JOB_NAME=cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system
KOKORO_GIT_COMMIT=b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_JOB_CLUSTER=GCP_UBUNTU
KOKORO_BLAZE_DIR=/tmpfs/src/objfs
KOKORO_ROOT=/tmpfs
KOKORO_JOB_TYPE=CONTINUOUS_INTEGRATION
KOKORO_ROOT_DIR=/tmpfs/
KOKORO_BUILD_NUMBER=3178
KOKORO_JOB_POOL=yoshi-ubuntu
KOKORO_GITHUB_COMMIT=b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_BUILD_INITIATOR=tangmatthew
KOKORO_ARTIFACTS_DIR=/tmpfs/src
KOKORO_BUILD_ID=73c08a3c-1e1e-4d4c-991a-825e0f9473ce
KOKORO_GFILE_DIR=/tmpfs/src/gfile
KOKORO_BUILD_CONFIG_DIR=
KOKORO_POSIX_ROOT=/tmpfs
KOKORO_BUILD_ARTIFACTS_SUBDIR=prod/cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system/3178/20241201-143938
WARNING: Skipping nox-automation as it is not installed.
[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
2024.10.9
nox > Running session system-3.10
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/system-3-10
nox > python -m pip install --pre 'grpcio!=1.52.0rc1'
nox > python -m pip install mock pytest google-cloud-testutils -c /tmpfs/src/github/python-aiplatform/testing/constraints-3.10.txt
nox > python -m pip install -e '.[testing]' -c /tmpfs/src/github/python-aiplatform/testing/constraints-3.10.txt
nox > py.test -v --junitxml=system_3.10_sponge_log.xml tests/system/vertexai/test_prompts.py
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.10.15, pytest-8.3.4, pluggy-1.5.0 -- /tmpfs/src/github/python-aiplatform/.nox/system-3-10/bin/python
cachedir: .pytest_cache
rootdir: /tmpfs/src/github/python-aiplatform
plugins: anyio-3.7.1, asyncio-0.24.0, xdist-3.3.1
asyncio: mode=strict, default_loop_scope=None
created: 16/16 workers
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
16 workers [4 items]
scheduling tests via LoadScopeScheduling
tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
[gw0] [ 25%] FAILED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_function_calling
[gw0] [ 50%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_function_calling
tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_variables
[gw0] [ 75%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_variables
tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_function_calling
[gw0] [100%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_function_calling
=================================== FAILURES ===================================
________________ TestPrompts.test_create_prompt_with_variables _________________
[gw0] linux -- Python 3.10.15 /tmpfs/src/github/python-aiplatform/.nox/system-3-10/bin/python
args = (parent: "projects/ucaip-sample-tests/locations/us-central1/datasets/7078335351982391296"
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/ucaip-sample-tests/locations/us-central1/datasets/70783353519...grpc/1.51.3 gax/2.21.0 gapic/1.73.0+top_google_constructor_method+vertexai.prompts._prompt_management.list_versions')]}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
try:
> return callable_(*args, **kwargs)
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.nox/system-3-10/lib/python3.10/site-packages/grpc/_channel.py:946: in __call__
return _end_unary_response_blocking(state, call, False, None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state =
call =
with_call = False, deadline = None
def _end_unary_response_blocking(state, call, with_call, deadline):
if state.code is grpc.StatusCode.OK:
if with_call:
rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
return state.response, rendezvous
else:
return state.response
else:
> raise _InactiveRpcError(state)
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.NOT_FOUND
E details = "The Dataset does not exist."
E debug_error_string = "UNKNOWN:Error received from peer ipv4:74.125.135.95:443 {grpc_message:"The Dataset does not exist.", grpc_status:5, created_time:"2024-12-01T22:46:40.68587038+00:00"}"
E >
.nox/system-3-10/lib/python3.10/site-packages/grpc/_channel.py:849: _InactiveRpcError
The above exception was the direct cause of the following exception:
self =
def test_create_prompt_with_variables(self):
# Create local Prompt
prompt = Prompt(
prompt_data="Hello, {name}! Today is {day}. How are you?",
variables=[
{"name": "Alice", "day": "Monday"},
{"name": "Bob", "day": "Tuesday"},
],
generation_config=GenerationConfig(temperature=0.1),
model_name="gemini-1.0-pro-002",
safety_settings=[
SafetySetting(
category=SafetySetting.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold=SafetySetting.HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
method=SafetySetting.HarmBlockMethod.SEVERITY,
)
],
system_instruction="Please answer in a short sentence.",
)
# Generate content using the assembled prompt for each variable set.
for i in range(len(prompt.variables)):
prompt.generate_content(
contents=prompt.assemble_contents(**prompt.variables[i])
)
# Save Prompt to online resource. Returns a new Prompt object associated with the online resource
prompt1 = prompts.create_version(prompt=prompt)
# Only new prompt should be associated with a prompt resource
assert prompt1.prompt_id
assert not prompt.prompt_id
# Update prompt and save a new version
prompt1.prompt_data = "Hi, {name}! How are you? Today is {day}."
prompt2 = prompts.create_version(prompt=prompt1, version_name="v2")
assert prompt2.prompt_id == prompt1.prompt_id
assert prompt2.version_id != prompt1.version_id
# Restore previous version
metadata = prompts.restore_version(
prompt_id=prompt2.prompt_id, version_id=prompt1.version_id
)
assert metadata.prompt_id == prompt2.prompt_id
assert metadata.version_id != prompt2.version_id
# List prompt versions
> versions_metadata = prompts.list_versions(prompt_id=prompt2.prompt_id)
tests/system/vertexai/test_prompts.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
vertexai/prompts/_prompt_management.py:710: in list_versions
versions_pager = temp_prompt._dataset_client.list_dataset_versions(
google/cloud/aiplatform_v1/services/dataset_service/client.py:2289: in list_dataset_versions
response = rpc(
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py:131: in __call__
return wrapped_func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (parent: "projects/ucaip-sample-tests/locations/us-central1/datasets/7078335351982391296"
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/ucaip-sample-tests/locations/us-central1/datasets/70783353519...grpc/1.51.3 gax/2.21.0 gapic/1.73.0+top_google_constructor_method+vertexai.prompts._prompt_management.list_versions')]}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
try:
return callable_(*args, **kwargs)
except grpc.RpcError as exc:
> raise exceptions.from_grpc_error(exc) from exc
E google.api_core.exceptions.NotFound: 404 The Dataset does not exist.
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:78: NotFound
------------------------------ Captured log call -------------------------------
INFO vertexai.prompts._prompts:_prompts.py:480 Assembled prompt replacing: 1 instances of variable name, 1 instances of variable day
INFO vertexai.prompts._prompts:_prompts.py:480 Assembled prompt replacing: 1 instances of variable name, 1 instances of variable day
INFO vertexai.prompts._prompt_management:_prompt_management.py:461 Created prompt resource with id 7078335351982391296 with version number 1
INFO vertexai.prompts._prompt_management:_prompt_management.py:488 Updated prompt resource with id 7078335351982391296 as version number 2
INFO vertexai.prompts._prompt_management:_prompt_management.py:551 Restored prompt version 1 under prompt id 7078335351982391296 as version number 3
=============================== warnings summary ===============================
.nox/system-3-10/lib/python3.10/site-packages/google/cloud/storage/_http.py:19: 16 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/google/cloud/storage/_http.py:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: 32 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: 32 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2317: 16 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2317: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(parent)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /tmpfs/src/github/python-aiplatform/system_3.10_sponge_log.xml -
=========================== short test summary info ============================
FAILED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
============= 1 failed, 3 passed, 96 warnings in 74.42s (0:01:14) ==============
nox > Command py.test -v --junitxml=system_3.10_sponge_log.xml tests/system/vertexai/test_prompts.py failed with exit code 1
nox > Session system-3.10 failed.
[FlakyBot] Sending logs to Flaky Bot...
[FlakyBot] See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
[FlakyBot] Published system_3.10_sponge_log.xml (12805067112132742)!
[FlakyBot] Done!
cleanup
[ID: 4423524] Command finished after 373 secs, exit value: 1
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
[14:47:01 PST] Collecting build artifacts from build VM
Build script failed with exit code: 1
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
[14:40:29 PST] Transferring environment variable script to build VM
[14:40:30 PST] Transferring kokoro_log_reader.py to build VM
[14:40:32 PST] Transferring source code to build VM
[14:40:47 PST] Executing build script on build VM
[ID: 4423524] Executing command via SSH:
export KOKORO_BUILD_NUMBER="3178"
export KOKORO_JOB_NAME="cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system"
source /tmpfs/kokoro-env_vars.sh; cd /tmpfs/src/ ; chmod 755 github/python-aiplatform/.kokoro/trampoline.sh ; PYTHON_3_VERSION="$(pyenv which python3 2> /dev/null || which python3)" ; PYTHON_2_VERSION="$(pyenv which python2 2> /dev/null || which python2)" ; if "$PYTHON_3_VERSION" -c "import psutil" ; then KOKORO_PYTHON_COMMAND="$PYTHON_3_VERSION" ; else KOKORO_PYTHON_COMMAND="$PYTHON_2_VERSION" ; fi > /dev/null 2>&1 ; echo "export KOKORO_PYTHON_COMMAND="$KOKORO_PYTHON_COMMAND"" > "$HOME/.kokoro_python_vars" ; nohup bash -c "( rm -f /tmpfs/kokoro_build_exit_code ; github/python-aiplatform/.kokoro/trampoline.sh ; echo \${PIPESTATUS[0]} > /tmpfs/kokoro_build_exit_code ) > /tmpfs/kokoro_build.log 2>&1" > /dev/null 2>&1 & echo $! > /tmpfs/kokoro_build.pid ; source "$HOME/.kokoro_python_vars" ; "$KOKORO_PYTHON_COMMAND" /tmpfs/kokoro_log_reader.py /tmpfs/kokoro_build.log /tmpfs/kokoro_build_exit_code /tmpfs/kokoro_build.pid /tmpfs/kokoro_log_reader.pid --start_byte 0
2024-12-01 14:40:48 Creating folder on disk for secrets: /tmpfs/src/gfile/secret_manager
Activated service account credentials for: [kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com]
WARNING: Your config file at [/home/kbuilder/.docker/config.json] contains these credential helper entries:
{
"credHelpers": {
"gcr.io": "gcr",
"us.gcr.io": "gcr",
"asia.gcr.io": "gcr",
"staging-k8s.gcr.io": "gcr",
"eu.gcr.io": "gcr"
}
}
These will be overwritten.
Docker configuration file updated.
Using default tag: latest
latest: Pulling from cloud-devrel-kokoro-resources/python-multi
ff65ddf9395b: Pulling fs layer
cdd9d79692c1: Pulling fs layer
e4862826b2aa: Pulling fs layer
d32630687f55: Pulling fs layer
dfa7816fe874: Pulling fs layer
0a8e089113ba: Pulling fs layer
d8c355139ad8: Pulling fs layer
cf2983c386f5: Pulling fs layer
f1826a77298e: Pulling fs layer
046f509f9618: Pulling fs layer
8614918c0f65: Pulling fs layer
4f8e6ed8e976: Pulling fs layer
42d703dfe78c: Pulling fs layer
d32630687f55: Waiting
3e6bd4022c16: Pulling fs layer
1faa0020373d: Pulling fs layer
0dbbcabd03ab: Pulling fs layer
dfa7816fe874: Waiting
3f7572e2d709: Pulling fs layer
017bd45224e3: Pulling fs layer
0a8e089113ba: Waiting
14922c403bfb: Pulling fs layer
137985dae17e: Pulling fs layer
c13dd2a78d7b: Pulling fs layer
946b68838e6d: Pulling fs layer
8c9cccb372af: Pulling fs layer
11221cca7dfc: Pulling fs layer
1c462c293704: Pulling fs layer
d8c355139ad8: Waiting
137985dae17e: Waiting
cf2983c386f5: Waiting
0dbbcabd03ab: Waiting
f1826a77298e: Waiting
c13dd2a78d7b: Waiting
3f7572e2d709: Waiting
046f509f9618: Waiting
946b68838e6d: Waiting
017bd45224e3: Waiting
8614918c0f65: Waiting
8c9cccb372af: Waiting
14922c403bfb: Waiting
4f8e6ed8e976: Waiting
11221cca7dfc: Waiting
1faa0020373d: Waiting
1c462c293704: Waiting
42d703dfe78c: Waiting
3e6bd4022c16: Waiting
e4862826b2aa: Verifying Checksum
e4862826b2aa: Download complete
d32630687f55: Verifying Checksum
d32630687f55: Download complete
ff65ddf9395b: Verifying Checksum
ff65ddf9395b: Download complete
dfa7816fe874: Verifying Checksum
dfa7816fe874: Download complete
0a8e089113ba: Verifying Checksum
0a8e089113ba: Download complete
cf2983c386f5: Verifying Checksum
cf2983c386f5: Download complete
ff65ddf9395b: Pull complete
d8c355139ad8: Verifying Checksum
d8c355139ad8: Download complete
046f509f9618: Verifying Checksum
046f509f9618: Download complete
cdd9d79692c1: Download complete
8614918c0f65: Verifying Checksum
8614918c0f65: Download complete
4f8e6ed8e976: Verifying Checksum
4f8e6ed8e976: Download complete
42d703dfe78c: Verifying Checksum
42d703dfe78c: Download complete
1faa0020373d: Verifying Checksum
1faa0020373d: Download complete
3e6bd4022c16: Verifying Checksum
3e6bd4022c16: Download complete
0dbbcabd03ab: Verifying Checksum
0dbbcabd03ab: Download complete
3f7572e2d709: Verifying Checksum
3f7572e2d709: Download complete
017bd45224e3: Verifying Checksum
017bd45224e3: Download complete
137985dae17e: Verifying Checksum
137985dae17e: Download complete
14922c403bfb: Verifying Checksum
14922c403bfb: Download complete
c13dd2a78d7b: Verifying Checksum
c13dd2a78d7b: Download complete
f1826a77298e: Verifying Checksum
f1826a77298e: Download complete
946b68838e6d: Verifying Checksum
946b68838e6d: Download complete
1c462c293704: Verifying Checksum
1c462c293704: Download complete
11221cca7dfc: Verifying Checksum
11221cca7dfc: Download complete
8c9cccb372af: Verifying Checksum
8c9cccb372af: Download complete
cdd9d79692c1: Pull complete
e4862826b2aa: Pull complete
d32630687f55: Pull complete
dfa7816fe874: Pull complete
0a8e089113ba: Pull complete
d8c355139ad8: Pull complete
cf2983c386f5: Pull complete
f1826a77298e: Pull complete
046f509f9618: Pull complete
8614918c0f65: Pull complete
4f8e6ed8e976: Pull complete
42d703dfe78c: Pull complete
3e6bd4022c16: Pull complete
1faa0020373d: Pull complete
0dbbcabd03ab: Pull complete
3f7572e2d709: Pull complete
017bd45224e3: Pull complete
14922c403bfb: Pull complete
137985dae17e: Pull complete
c13dd2a78d7b: Pull complete
946b68838e6d: Pull complete
8c9cccb372af: Pull complete
11221cca7dfc: Pull complete
1c462c293704: Pull complete
Digest: sha256:9bb9bd3cd602cf04a361ef46d2f32e514ed06ab856e0fb889349572ec028d89a
Status: Downloaded newer image for gcr.io/cloud-devrel-kokoro-resources/python-multi:latest
gcr.io/cloud-devrel-kokoro-resources/python-multi:latest
Executing: docker run --rm --interactive --network=host --privileged --volume=/var/run/docker.sock:/var/run/docker.sock --workdir=/tmpfs/src --entrypoint=github/python-aiplatform/.kokoro/build.sh --env-file=/tmpfs/tmp/tmpdiq_n1km/envfile --volume=/tmpfs:/tmpfs gcr.io/cloud-devrel-kokoro-resources/python-multi
KOKORO_KEYSTORE_DIR=/tmpfs/src/keystore
KOKORO_GITHUB_COMMIT_URL=https://github.com/googleapis/python-aiplatform/commit/b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_JOB_NAME=cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system
KOKORO_GIT_COMMIT=b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_JOB_CLUSTER=GCP_UBUNTU
KOKORO_BLAZE_DIR=/tmpfs/src/objfs
KOKORO_ROOT=/tmpfs
KOKORO_JOB_TYPE=CONTINUOUS_INTEGRATION
KOKORO_ROOT_DIR=/tmpfs/
KOKORO_BUILD_NUMBER=3178
KOKORO_JOB_POOL=yoshi-ubuntu
KOKORO_GITHUB_COMMIT=b6cf368387eec02c9d52b669789ee88085ba96b9
KOKORO_BUILD_INITIATOR=tangmatthew
KOKORO_ARTIFACTS_DIR=/tmpfs/src
KOKORO_BUILD_ID=73c08a3c-1e1e-4d4c-991a-825e0f9473ce
KOKORO_GFILE_DIR=/tmpfs/src/gfile
KOKORO_BUILD_CONFIG_DIR=
KOKORO_POSIX_ROOT=/tmpfs
KOKORO_BUILD_ARTIFACTS_SUBDIR=prod/cloud-devrel/client-libraries/python/googleapis/python-aiplatform/continuous/system/3178/20241201-143938
WARNING: Skipping nox-automation as it is not installed.
[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
2024.10.9
nox > Running session system-3.10
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/system-3-10
nox > python -m pip install --pre 'grpcio!=1.52.0rc1'
nox > python -m pip install mock pytest google-cloud-testutils -c /tmpfs/src/github/python-aiplatform/testing/constraints-3.10.txt
nox > python -m pip install -e '.[testing]' -c /tmpfs/src/github/python-aiplatform/testing/constraints-3.10.txt
nox > py.test -v --junitxml=system_3.10_sponge_log.xml tests/system/vertexai/test_prompts.py
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.10.15, pytest-8.3.4, pluggy-1.5.0 -- /tmpfs/src/github/python-aiplatform/.nox/system-3-10/bin/python
cachedir: .pytest_cache
rootdir: /tmpfs/src/github/python-aiplatform
plugins: anyio-3.7.1, asyncio-0.24.0, xdist-3.3.1
asyncio: mode=strict, default_loop_scope=None
created: 16/16 workers
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
16 workers [4 items]
scheduling tests via LoadScopeScheduling
tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
[gw0] [ 25%] FAILED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_function_calling
[gw0] [ 50%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_function_calling
tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_variables
[gw0] [ 75%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_variables
tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_function_calling
[gw0] [100%] PASSED tests/system/vertexai/test_prompts.py::TestPrompts::test_get_prompt_with_function_calling
=================================== FAILURES ===================================
________________ TestPrompts.test_create_prompt_with_variables _________________
[gw0] linux -- Python 3.10.15 /tmpfs/src/github/python-aiplatform/.nox/system-3-10/bin/python
args = (parent: "projects/ucaip-sample-tests/locations/us-central1/datasets/7078335351982391296"
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/ucaip-sample-tests/locations/us-central1/datasets/70783353519...grpc/1.51.3 gax/2.21.0 gapic/1.73.0+top_google_constructor_method+vertexai.prompts._prompt_management.list_versions')]}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
try:
> return callable_(*args, **kwargs)
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.nox/system-3-10/lib/python3.10/site-packages/grpc/_channel.py:946: in __call__
return _end_unary_response_blocking(state, call, False, None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state =
call =
with_call = False, deadline = None
def _end_unary_response_blocking(state, call, with_call, deadline):
if state.code is grpc.StatusCode.OK:
if with_call:
rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
return state.response, rendezvous
else:
return state.response
else:
> raise _InactiveRpcError(state)
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.NOT_FOUND
E details = "The Dataset does not exist."
E debug_error_string = "UNKNOWN:Error received from peer ipv4:74.125.135.95:443 {grpc_message:"The Dataset does not exist.", grpc_status:5, created_time:"2024-12-01T22:46:40.68587038+00:00"}"
E >
.nox/system-3-10/lib/python3.10/site-packages/grpc/_channel.py:849: _InactiveRpcError
The above exception was the direct cause of the following exception:
self =
def test_create_prompt_with_variables(self):
# Create local Prompt
prompt = Prompt(
prompt_data="Hello, {name}! Today is {day}. How are you?",
variables=[
{"name": "Alice", "day": "Monday"},
{"name": "Bob", "day": "Tuesday"},
],
generation_config=GenerationConfig(temperature=0.1),
model_name="gemini-1.0-pro-002",
safety_settings=[
SafetySetting(
category=SafetySetting.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold=SafetySetting.HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
method=SafetySetting.HarmBlockMethod.SEVERITY,
)
],
system_instruction="Please answer in a short sentence.",
)
# Generate content using the assembled prompt for each variable set.
for i in range(len(prompt.variables)):
prompt.generate_content(
contents=prompt.assemble_contents(**prompt.variables[i])
)
# Save Prompt to online resource. Returns a new Prompt object associated with the online resource
prompt1 = prompts.create_version(prompt=prompt)
# Only new prompt should be associated with a prompt resource
assert prompt1.prompt_id
assert not prompt.prompt_id
# Update prompt and save a new version
prompt1.prompt_data = "Hi, {name}! How are you? Today is {day}."
prompt2 = prompts.create_version(prompt=prompt1, version_name="v2")
assert prompt2.prompt_id == prompt1.prompt_id
assert prompt2.version_id != prompt1.version_id
# Restore previous version
metadata = prompts.restore_version(
prompt_id=prompt2.prompt_id, version_id=prompt1.version_id
)
assert metadata.prompt_id == prompt2.prompt_id
assert metadata.version_id != prompt2.version_id
# List prompt versions
> versions_metadata = prompts.list_versions(prompt_id=prompt2.prompt_id)
tests/system/vertexai/test_prompts.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
vertexai/prompts/_prompt_management.py:710: in list_versions
versions_pager = temp_prompt._dataset_client.list_dataset_versions(
google/cloud/aiplatform_v1/services/dataset_service/client.py:2289: in list_dataset_versions
response = rpc(
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py:131: in __call__
return wrapped_func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (parent: "projects/ucaip-sample-tests/locations/us-central1/datasets/7078335351982391296"
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/ucaip-sample-tests/locations/us-central1/datasets/70783353519...grpc/1.51.3 gax/2.21.0 gapic/1.73.0+top_google_constructor_method+vertexai.prompts._prompt_management.list_versions')]}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
try:
return callable_(*args, **kwargs)
except grpc.RpcError as exc:
> raise exceptions.from_grpc_error(exc) from exc
E google.api_core.exceptions.NotFound: 404 The Dataset does not exist.
.nox/system-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:78: NotFound
------------------------------ Captured log call -------------------------------
INFO vertexai.prompts._prompts:_prompts.py:480 Assembled prompt replacing: 1 instances of variable name, 1 instances of variable day
INFO vertexai.prompts._prompts:_prompts.py:480 Assembled prompt replacing: 1 instances of variable name, 1 instances of variable day
INFO vertexai.prompts._prompt_management:_prompt_management.py:461 Created prompt resource with id 7078335351982391296 with version number 1
INFO vertexai.prompts._prompt_management:_prompt_management.py:488 Updated prompt resource with id 7078335351982391296 as version number 2
INFO vertexai.prompts._prompt_management:_prompt_management.py:551 Restored prompt version 1 under prompt id 7078335351982391296 as version number 3
=============================== warnings summary ===============================
.nox/system-3-10/lib/python3.10/site-packages/google/cloud/storage/_http.py:19: 16 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/google/cloud/storage/_http.py:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: 32 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: 32 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2317: 16 warnings
/tmpfs/src/github/python-aiplatform/.nox/system-3-10/lib/python3.10/site-packages/pkg_resources/__init__.py:2317: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(parent)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /tmpfs/src/github/python-aiplatform/system_3.10_sponge_log.xml -
=========================== short test summary info ============================
FAILED tests/system/vertexai/test_prompts.py::TestPrompts::test_create_prompt_with_variables
============= 1 failed, 3 passed, 96 warnings in 74.42s (0:01:14) ==============
nox > Command py.test -v --junitxml=system_3.10_sponge_log.xml tests/system/vertexai/test_prompts.py failed with exit code 1
nox > Session system-3.10 failed.
[FlakyBot] Sending logs to Flaky Bot...
[FlakyBot] See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
[FlakyBot] Published system_3.10_sponge_log.xml (12805067112132742)!
[FlakyBot] Done!
cleanup
[ID: 4423524] Command finished after 373 secs, exit value: 1
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
[14:47:01 PST] Collecting build artifacts from build VM
Build script failed with exit code: 1