I just finished the last lesson of week 4. I still have doubts about the aisetup package.
Although I understand that the deeplearning course team wanted to provide an easy way to help us to set up an AI environment on our local computers I hesitate to use it because:
it is a black box. Although I finally found out what it contains it looks quite complicated and I would not know how to modify it.
the model in use is hard coded as chatgpt-40-mini. This may change over time or is not the model someone wants to use.
Why did you choose that solution?
I thought that we have a lesson with a notebook template where in a guided way we define and collect all package installations, imports, functions, … that we need for our local environment.
Then we save it for example as my_aisetup.ipynb and my_aisetup.py and copy it into our local jupyter environment.
That way we could always load it in our notebook and modify it and always check what it does.
And we can use it via
from my_aisetup import …
A suggested structure could be:
It could start with instructions how to install python, a virtual environment and jupyter.
Then a section which third-party packages to install and to import to cover all the lessons of the course.
Then a section how to set up a local .env file and to access the openai api.
What do you think? I think I will do it that way myself but maybe it is an option for the course also.
Hi @Jochen_Keilitz
Thanks for your suggestions. I would like to add some comments
The way we create a virtual environment has some standards like using a requirements.txt file, which you will find in some courses.
Another point is the instructions about Python, Jupyter, and so on. As these are not the target of the course, I guess that providing links to those contents is very useful, mainly because the learner will find more useful info on these links, as they are focused on helping the learner with the points we commented above. That said, the course content can be focused on what is described in the title.
Keep learning!
I understand that this is a beginners course. But lesson 6 “APIs to use AI Models” and the optional lesson 7 “Install Python on your computer” both address how to create a .env file and work with openai and how to install Python and Jupyter. So it is already part of the course.
I really like the course and now I am busy to setup my own learning and project environment. So I look at all the lessons and ask myself, what do I have to do in which order and what functionality do I need. For example I realized that I have to think about a .venv configuration (that is what I am learning right now). And I also realized that after the course we will not have access to the course lessons any more, so it is better to set up our own environment now.
What I wanted to say is that the aisetup package maybe is not as helpful as it may look like.
For example when you want to create your own openai client for your api-key then being asked to use the authenticate function is confusing because in my understanding its only purpose is to differentiate between the coursera environment and and any other local environment. But that differentiation you would not need after the course in your local environment and you also would like to strip down the setup to the functionality that you really need.
Good suggestions @Jochen_Keilitz but the above two points as already covered by the courses, one which @carlosrl mentioned as requirements.txt.file
and how to get your own api key, as per my understanding they don’t provide a direct link but they do have those information box in the lesson assignment.
This surely can be added as great way to start once someone complete the specialisation. But remember the basic instruction can be provided but as it will again depend on operating system one is using and have understanding of basic settings, the probable idea must have not been mustered.
When I started learning python, even asking an IT friend didn’t help. Only response I got was they didn’t know, and me being a complete non-IT person, Google digging helped me alot. They can probably add such links to the black box for people to understand further for python and jupyter installment. Great suggestion.
I am learning the course and found it easily navigating, interesting and very useful as well.
I agree with Jochen, the creation of .env and getting api_key part was the one which took some time to get hold of.
Another issue I faced which I think can be discussed, was the openai key generation. The very first time I try to use, it starts giving error that I have reached the limit, which I found strange. If someone can comment to help with it that will be really helpful.
there is a limit of free use of openai api key even on the course environment, if you used that, than you can either try to use with different email address for course code run success, or wait for a month or get your own api keys.
Thanks for prompt reply.
I do have created key on platform.openai and using that.
It was the first time I was using the key. May be I’ll try another email and give it a go.
Thanks again!
On the unrelated topic, can you please provide a link about where to download helper_function from, which have *_llm_response functions etc.
I was not able to find it in AI Python for beginner course, which I have just finished.
for lesson assignment you are working on. Click File==>Open. you will have all the metadata there.
there is another way for the openai api key issue but one would require to make changes themselves in the code when using Gemini api keys as then you also might need to make changes in the metadata (helper function.ipynb)
I looked at it again and here is my suggestion for a replacement of the aisetup package:
I use a my_aisetup.py file that I created with the jupyter notebook as my_aisetup.ipynb. I stored it in my jupyter directory. If I work on my local computer I import it as follows
from my_aisetup import get_llm_response, …
the same way we had the helper_functions in the course. If I need an update or modification I simply create a new version with my jupyter notebook. I find this easier and more transparent than creating and modifying the aisetup package.
I just want to add to what others have been correctly stating.
This is a beginner level course, with its aim to teach you python and using LLM to help you code.
Providing additional instructions on how to set up a python environments and notebook is always tricky based on many changing factors (and thus, lifelong maintenance), so that part is left to the learners if they want to learn this on their own. The course is a starting point for them. And frankly, you learn more when you playground and figure things out on your own.
As for the aisetup, your points are valid that it is complicated and not flexible, but then again, the point of the package was not to be used professionally outside of the course. It was designed to teach about how packages can be, and what it would look like if you put the frequent functions you have been using throughout the courses/modules in a package. This package was designed for the purposes of only being used and making it work only for this course.
I’m happy to see that you have been curious enough to playground and make your own version of the package!
Hi @Mubsi,
I get the point and I understand, that the package has been made to learn how to use packages.
I did not see that. I was quite busy to set up an environment on my local computer so that once the course is finished I can continue learning. It felt like you were learning from a book and then after learning the book is gone. That is why I was looking for some way how to do that before the end of the course.
So I started to create my own my_aisetup notebook and came up with the idea that instead of providing a library in the course we could have a jupyter lab lesson where you do that as part of the course (similarily to the python and anaconda session but with video and interaction). Afterwards you then can take that notebook as a template to your own environment. That was my suggestion.
But I get your point.
I have finished the course now and want to take the opportunity to say thank you especially for the fantastic support of the community and you mentors and coaches. What a great course!