Skip to content

[BUG]: Personalized-Shopping Agent Times Out for Deployment #349

@Noahsunpro

Description

@Noahsunpro

Name of sample affected

python/agents/personalized-shopping

Description of issue

Attempting to deploy leads to timeout failures with no clear cause in the logs.

Environment

Attempting to deploy from a Vertex AI Workbench Jupyter Notebook

Reproduction steps or code

I've followed the Readme.md exactly and fail at python3 deploy.py

Error log

(py311) jupyter@checkout-gpt:~/adk-samples/python/agents/personalized-shopping/deployment$ python3 deploy.py
Gym has been unmaintained since 2022 and does not support NumPy 2.0 amongst other critical functionality.
Please upgrade to Gymnasium, the maintained drop-in replacement of Gym, or contact the authors of your software and request that they upgrade.
See the migration guide at https://gymnasium.farama.org/introduction/migration_guide/ for additional information.
WARNING: Using incubator modules: jdk.incubator.vector
/opt/conda/envs/py311/lib/python3.11/site-packages/gym/envs/registration.py:595: UserWarning: WARN: Overriding environment WebAgentTextEnv-v0
logger.warn(f"Overriding environment {id}")
Products loaded.
Keys cleaned.
Attributes loaded.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50000/50000 [00:00<00:00, 131931.78it/s]
Aug 26, 2025 6:10:05 AM org.apache.lucene.store.MemorySegmentIndexInputProvider
INFO: Using MemorySegmentIndexInput with Java 21; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false
Loaded 495496 goals.
Finished initializing WebshopEnv with 50000 items.
cloud_project=ncau-data-nprod-aitrain
cloud_location=australia-southeast2
storage_bucket=checkoutgpt

Deploying app begin...
Deploying agent to agent engine...
Identified the following requirements: {'google-cloud-aiplatform': '1.110.0', 'pydantic': '2.11.7', 'cloudpickle': '3.1.1'}

2025-08-26 06:10:07,332 - vertexai.agent_engines - INFO - Identified the following requirements: {'google-cloud-aiplatform': '1.110.0', 'pydantic': '2.11.7', 'cloudpickle': '3.1.1'}
The following requirements are missing: {'google-cloud-aiplatform', 'pydantic', 'cloudpickle'}

2025-08-26 06:10:07,333 - vertexai.agent_engines - WARNING - The following requirements are missing: {'google-cloud-aiplatform', 'pydantic', 'cloudpickle'}
The following requirements are appended: {'pydantic==2.11.7', 'cloudpickle==3.1.1'}

2025-08-26 06:10:07,333 - vertexai.agent_engines - INFO - The following requirements are appended: {'pydantic==2.11.7', 'cloudpickle==3.1.1'}
The final list of requirements: ['./personalized_shopping-0.1.0-py3-none-any.whl', 'pydantic==2.11.7', 'cloudpickle==3.1.1']

2025-08-26 06:10:07,333 - vertexai.agent_engines - INFO - The final list of requirements: ['./personalized_shopping-0.1.0-py3-none-any.whl', 'pydantic==2.11.7', 'cloudpickle==3.1.1']
Using bucket checkoutgpt

2025-08-26 06:10:08,917 - vertexai.agent_engines - INFO - Using bucket checkoutgpt
Wrote to gs://checkoutgpt/agent_engine/agent_engine.pkl

2025-08-26 06:10:09,237 - vertexai.agent_engines - INFO - Wrote to gs://checkoutgpt/agent_engine/agent_engine.pkl
Writing to gs://checkoutgpt/agent_engine/requirements.txt

2025-08-26 06:10:09,307 - vertexai.agent_engines - INFO - Writing to gs://checkoutgpt/agent_engine/requirements.txt
Creating in-memory tarfile of extra_packages

2025-08-26 06:10:09,307 - vertexai.agent_engines - INFO - Creating in-memory tarfile of extra_packages
Writing to gs://checkoutgpt/agent_engine/dependencies.tar.gz

2025-08-26 06:10:09,371 - vertexai.agent_engines - INFO - Writing to gs://checkoutgpt/agent_engine/dependencies.tar.gz
failed to generate schema for async_add_session_to_memory: async_add_session_to_memory is not fully defined; you should define Session, then call async_add_session_to_memory.model_rebuild().

For further information visit https://errors.pydantic.dev/2.11/u/class-not-fully-defined

2025-08-26 06:10:09,379 - vertexai.agent_engines - WARNING - failed to generate schema for async_add_session_to_memory: async_add_session_to_memory is not fully defined; you should define Session, then call async_add_session_to_memory.model_rebuild().

For further information visit https://errors.pydantic.dev/2.11/u/class-not-fully-defined
Creating AgentEngine

2025-08-26 06:10:11,559 - vertexai.agent_engines - INFO - Creating AgentEngine
Create AgentEngine backing LRO: projects/255909145646/locations/australia-southeast2/reasoningEngines/7445364977717739520/operations/4016094863312289792

2025-08-26 06:10:11,559 - vertexai.agent_engines - INFO - Create AgentEngine backing LRO: projects/255909145646/locations/australia-southeast2/reasoningEngines/7445364977717739520/operations/4016094863312289792
View progress and logs at https://console.cloud.google.com/logs/query?project=ncau-data-nprod-aitrain

2025-08-26 06:10:11,559 - vertexai.agent_engines - INFO - View progress and logs at https://console.cloud.google.com/logs/query?project=ncau-data-nprod-aitrain
Traceback (most recent call last):
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 147, in retry_target
result = target()
^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/future/polling.py", line 120, in _done_or_raise
raise _OperationNotComplete()
google.api_core.future.polling._OperationNotComplete

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/future/polling.py", line 137, in _blocking_poll
polling(self._done_or_raise)(retry=retry)
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 294, in retry_wrapped_func
return retry_target(
^^^^^^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 156, in retry_target
next_sleep = _retry_error_helper(
^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/retry/retry_base.py", line 229, in _retry_error_helper
raise final_exc from source_exc
google.api_core.exceptions.RetryError: Timeout of 900.0s exceeded, last exception:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jupyter/adk-samples/python/agents/personalized-shopping/deployment/deploy.py", line 49, in
remote_app = agent_engines.create(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/vertexai/agent_engines/init.py", line 191, in create
return AgentEngine.create(
^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/vertexai/agent_engines/_agent_engines.py", line 573, in create
created_resource = operation_future.result()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/future/polling.py", line 256, in result
self._blocking_poll(timeout=timeout, retry=retry, polling=polling)
File "/opt/conda/envs/py311/lib/python3.11/site-packages/google/api_core/future/polling.py", line 139, in _blocking_poll
raise concurrent.futures.TimeoutError(
TimeoutError: Operation did not complete within the designated timeout of 900 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions