Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quota exceeded no matter what the quota is in langchain notebook example #171

Open
jeffbryner opened this issue Aug 27, 2023 · 4 comments
Open
Assignees

Comments

@jeffbryner
Copy link

jeffbryner commented Aug 27, 2023

When attempting to run https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/use-cases/document-qa/question_answering_documents_langchain.ipynb in cell 18

doc_ids = me.add_texts(texts=texts, metadatas=metadatas)

I get a

ResourceExhausted: 429 Quota exceeded for aiplatform.googleapis.com/online_prediction_requests_per_base_model with base model: textembedding-gecko. Please submit a quota increase request. https://cloud.google.com/vertex-ai/docs/quotas.

My quota is not exceeded however (and I increased it) when checking the quota dashboard in GCP.

I attempted to limit the scope using

doc_ids = me.add_texts(texts=texts[0], metadatas=metadatas[0])

and receive the same error.

@jeffbryner
Copy link
Author

Screenshot 2023-08-27 at 12 35 08 PM

@GDBSD
Copy link

GDBSD commented Sep 12, 2023

This is just a quick hack so I could get the notebook to work:

def add_docs_to_index(start, end):
    doc_ids = me.add_texts(texts=texts[start:end], metadatas=metadatas[start:end])
    return end

loaded = 50
document_count = len(texts)
increment = 50

while loaded + increment <= document_count:
    start = loaded + 1
    end = start + increment
    indexed = add_docs_to_index(start, end)
    print('indexed = ', indexed)
    loaded += increment
    
remaining = document_count - loaded
add_docs_to_index(loaded +1, remaining)

@GDBSD
Copy link

GDBSD commented Sep 12, 2023

Was also getting a key error for document _name in the metadatas list of dicts. Looking at the metadata there was only source and chunk

@holtskinner
Copy link
Collaborator

@inardini Can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants