This is a great short course - thanks for organizing!
I’m noticing that a few people that want to run the lab locally have questions. Would you be able to post a short guide outlining requirements (e.g. modules that need to be installed) and other considerations (e.g. cost)?
Thanks, @balaji.ambresh! Yes - this is a step into the right direction but the thread is old so many modules etc. have changed or are no longer relevant.
It would be nice to have a “how to run this course on your local machine” guide that is specific to a course so that the folks that like to code along on their computers can do so easily.
Thanks for confirming. I’ve already asked the staff about this and for some reason requirements.txt hasn’t been shared across any course.
Follow the imports from start of the assignment and there’ll be only a few that need digging. It’d be great if you and a bunch of other learners could start commenting on this topic to give a better picture of your needs to the staff.
I agree with @GC23 - a requirements.txt would be nice.
Also I wonder, since Llama is mentioned frequently (e.g. llama_index, TruLlama) - do we need an instance of Llama running, or no? Some clarification would help.
Locally running the utility.py file (Lesson 1) throws the below errors. btw, I have the latest llama_index and trulens_eval installed in my environment. I think the error is coming from trulens_eval. Can you please help me sort this out? I appreciate your support with this.
when I run the below code (code cell #13 in the jupyter notebook) locally
with tru_recorder as recording:
for question in eval_questions:
response = query_engine.query(question)
I get the following error:
openai request failed <class ‘openai.AuthenticationError’>=Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: ********************************. You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘invalid_api_key’}}. Retries remaining=3.
I am stumped because my API key works well when I query without tru_eval (code cell: 7 in the jupyter notebook) .
response = query_engine.query("What are steps to take when finding projects to build your experience?")
print(str(response))
I am only getting the error when I prefix this with “with tru_recorder as recording:”
Do you know why this is ? do I need a specific openAI API key to use tru_eval with OpenAI?
I see that in the utils.py file, you are importing
from trulens_eval import OpenAI,
in the main file, you are also using
from trulens_eval import OpenAI as fOpenAI
and you are calling openai = OpenAI(), and no model_name, and end_points are passed as arguments.
However, in my local environment I am using AzureOpenAI from llama_index
Also, for my embeddings model, I am using AzureOpenAI from llama_index. When i try to use openai = AzureOpenAI() instead to pass my model.
I am guessing this is the problem for the 'openai request failed <class ‘openai.AuthenticationError’>=Error code: 401 '. Is there a way for trulens_eval to accomodate embeddings / llm from llama_index and Azure_OpenAI instead ?
I have no idea about azure. Please refer their docs / forums on how to set up the OPENAI access key. If an expert advice is required for your project, please hire a consultant.
Thanks for sharing, @Adam_Hjerpe
Please use the notebook versions of the libraries when setting up your environment if you’re new to programming in python.
Semantic versioning insists that major version should be incremented for incompatable API changes. If the functionality under the hood changes a lot without any change in just the API signature, some deleveper teams might just increase the patch / minor versions. For the best part, you don’t need to worry about this. Do be aware of this situation using a more recent version of a library than the one used in the exercise notebooks.