dependencies/vertexai.py eagerly imports the deprecated vertexai.preview.rag, so every evaluation import warns
Mantenedores costumam responder em até 6 dias
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 74/100
Direção de pesquisa
Leia src/google/adk/dependencies/vertexai.py e verifique as importações no nível do módulo. Em seguida, inspecione evaluation/vertex_ai_eval_facade.py e tools/retrieval/vertex_ai_rag_retrieval.py para entender qual código precisa de RAG. Execute o comando de reprodução tratando os avisos como erros. O trabalho estará concluído quando importar a facade de avaliação não gerar mais uma exceção nem emitir o aviso de descontinuação do RAG, enquanto a funcionalidade de RAG continuar disponível.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Required Information
Describe the Bug:
google/adk/dependencies/vertexai.py imports vertexai.preview.rag at module level. Since google-cloud-aiplatform deprecated that module, the import emits a UserWarning on load. Every ADK module that imports anything from ..dependencies.vertexai therefore triggers it, even when it only needs vertexai itself. That includes evaluation/vertex_ai_eval_facade.py:29 (from ..dependencies.vertexai import vertexai) and the other evaluation modules. As a result, every AgentEvaluator / adk eval run prints the deprecation warning, although no RAG code is used. Under -W error::UserWarning (or filterwarnings = error in pytest) the import fails.
The code is unchanged on main (d4e092e997): src/google/adk/dependencies/vertexai.py:19 still reads from vertexai.preview import rag as rag.
Steps to Reproduce:
pip install "google-adk[eval]==2.11.0" "google-cloud-aiplatform==1.163.0".python -W error::UserWarning -c "import google.adk.evaluation.vertex_ai_eval_facade"
Expected Behavior:
Importing ADK's evaluation modules emits no deprecation warning for a module they do not use. The RAG import should happen only where RAG is used (tools/retrieval/vertex_ai_rag_retrieval.py already imports it only under TYPE_CHECKING, line 35, and inside the call, line 103), or move to the replacement client.
Observed Behavior:
File ".../google/adk/evaluation/vertex_ai_eval_facade.py", line 29, in <module>
File ".../google/adk/dependencies/vertexai.py", line 19, in <module>
File ".../vertexai/preview/rag/__init__.py", line 186, in <module>
UserWarning: The `vertexai.preview.rag` module is deprecated and will be removed in a future version. Please migrate to the `agentplatform` client. For example:
import agentplatform
client = agentplatform.Client(project="your-project", location="us-central1")
client.rag.create_corpus(...)
Without -W error, the same warning appears in pytest's warnings summary of every evaluation test.
Environment Details:
- ADK Library Version: 2.11.0 (code identical on
maind4e092e997) - Desktop OS: macOS 27.2
- Python Version: 3.12.8
Model Information:
- Are you using LiteLLM: No
- Which model is being used: N/A (import-time behaviour)
Optional Information
Regression:
The ADK code is not new. The warning appears with google-cloud-aiplatform 1.163.0, which deprecates vertexai.preview.rag. Once that module is removed, the import in dependencies/vertexai.py would fail outright, taking the evaluation modules with it.
Possible fix:
Drop the eager from vertexai.preview import rag from dependencies/vertexai.py. Let the RAG retrieval tool import vertexai.preview.rag inside the call, where it already defers the import, or migrate it to the agentplatform client the deprecation message names. example_stores, imported the same way, emits no warning today.
- Linguagem predominante
- Python
- Estrelas
- 21.6k
- Forks
- 4k
- Merge médio
- 9h 59min
- PRs com merge (30d)
- 5
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de google/adk-python
-
CI Mypy Check flags an existing streaming_utils.py error as new because the PR run reuses the baseline's mypy cacheTalvez já em andamento @DeanChensj assumiu há 1 dia. Abertaneeds review
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
google/adk-python#7409 · 1 comentário · 2 responsáveis ·
Mantenedores costumam responder em até 6 dias
-
A2aAgentExecutor sends the raw exception text to the A2A caller when the run failsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaa2a request clarification
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
google/adk-python#7385 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 6 dias
-
needs review web
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
google/adk-python#7381 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 6 dias
-
[A2A] RemoteA2aAgent(use_legacy=False): extension header written to state['http_kwargs'], ignored by a2a-sdk 1.x transportsTalvez já em andamento @surajksharma07 assumiu há 8 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
google/adk-python#7334 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 6 dias
-
RestApiTool raises uncaught KeyError when a required path param is omittedTalvez já em andamento @llalitkumarrr assumiu há 9 dias. Abertarequest clarification tools
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
google/adk-python#7282 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 6 dias
Todas as issues de google/adk-python
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
agrc/palletjack#208 ·
-
status/needs-triage type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
PKU-YuanGroup/OpenAI4S#218 ·
Mantenedores costumam responder em até 1 dia
-
Test LeakageTalvez já em andamento @garland3 assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
sandialabs/atlas-ui-3#1030 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
aws-samples/sample-ai-persona#151 ·
Mantenedores costumam responder em até 1 dia