Closed adampingel closed 1 month ago
@AnnaGutowska I can probably help with this. Can you tell me which version of Python you are using to get this to run successfully? It fails with Python 3.10.12 and 3.10.15.
Hi @fayvor, I am able to run it locally with Python 3.11.9 as well as on Colab without any errors (granted that the user inputs their api key and project id where instructed)
@fayvor please note, I will be making a PR for this change:
llm = langchain_ibm.WatsonxLLM( **should be just WatsonxLLM**
model_id="ibm/granite-3-8b-instruct",
url=credentials.get("url"),
apikey=credentials.get("apikey"),
project_id=credentials.get("project_id"),
params={
GenParams.DECODING_METHOD: "greedy",
GenParams.TEMPERATURE: 0,
GenParams.MIN_NEW_TOKENS: 5,
GenParams.MAX_NEW_TOKENS: 250,
GenParams.STOP_SEQUENCES: ["Human:", "Observation"],
},
)
@AnnaGutowska I think it may pass sometimes on Colab if the libraries are installed in a certain order. Once I get it to run, I can specify a version range for the faulty package.
@AnnaGutowska I was able to get Agentic_RAG to run on Colab (and use the Colab secrets) with these changes: https://github.com/ibm-granite-community/granite-snack-cookbook/pull/45
Great, thank you so much! @fayvor I see the tests fail at the authentication step now and not at the package imports anymore.
No problem! Yes, we'll need to add the WatsonX keys to the Github CI environment.
Those are already in place
Now we're getting this "token_quota_reached" failure in Agentic_RAG:
ApiRequestFailure: Failure during generate. (POST ***ml/v1/text/generation?version=2024-10-14)
Status code: 403, body: {"errors":[{"code":"token_quota_reached","message":"Request of 1 token(s) from quota was rejected","more_info":"https://cloud.ibm.com/apidocs/watsonx-ai"}],"trace":"fd0b0ed54e2cf8b523574b4c3b30a2df","status_code":403}
@fayvor I am receiving the same error in this PR. Is the API key used by the org attached to a free account of watsonx? This is likely the reason for the error.
FYI @fayvor and @rawkintrevo