@ -48,7 +48,7 @@ This creates a new directory `llm_engineering` within your Projects folder and d
### Part 2: Install Anaconda environment
### Part 2: Install Anaconda environment
There is an alternative to Part 2 if this gives you problems.
If this Part 2 gives you any problems, there is an alternative Part 2B below that can be used instead.
1. **Install Anaconda:**
1. **Install Anaconda:**
@ -158,11 +158,11 @@ This file won't appear in Jupyter Lab because jupyter hides files starting with
### Part 5 - Showtime!!
### Part 5 - Showtime!!
- Open **Anaconda Prompt** (search for it in the Start menu)
- Open **Anaconda Prompt** (search for it in the Start menu) if you used Anaconda, otherwise open a Powershell if you used the alternative approach in Part 2B
- Navigate to the "project root directory" by entering something like `cd C:\Users\YourUsername\Documents\Projects\llm_engineering` using the actual path to your llm_engineering project root directory. Do a `dir` and check you can see subdirectories for each week of the course.
- Navigate to the "project root directory" by entering something like `cd C:\Users\YourUsername\Documents\Projects\llm_engineering` using the actual path to your llm_engineering project root directory. Do a `dir` and check you can see subdirectories for each week of the course.
- Activate your environment with `conda activate llms`(or `llms\Scripts\activate` if you used the alternative approach in Part 2B)
- Activate your environment with `conda activate llms`if you used Anaconda or `llms\Scripts\activate` if you used the alternative approach in Part 2B
- You should see (llms) in your prompt which is your sign that all is well. And now, type: `jupyter lab` and Jupyter Lab should open up, ready for you to get started. Open the `week1` folder and double click on `day1.ipynb`.
- You should see (llms) in your prompt which is your sign that all is well. And now, type: `jupyter lab` and Jupyter Lab should open up, ready for you to get started. Open the `week1` folder and double click on `day1.ipynb`.
"Try running the next cell (click in the cell under this one and hit shift+return).\n",
"Try running the next 2 cells (click in the cell under this one and hit shift+return, then shift+return again).\n",
"\n",
"\n",
"If this gives an error, then you're likely not running in an \"activated\" environment. Please check back in Part 5 of the SETUP guide for [PC](../SETUP-PC.md) or [Mac](../SETUP-mac.md) for setting up the Anaconda (or virtualenv) environment and activating it, before running `jupyter lab`.\n",
"If this gives an error, then you're likely not running in an \"activated\" environment. Please check back in Part 5 of the SETUP guide for [PC](../SETUP-PC.md) or [Mac](../SETUP-mac.md) for setting up the Anaconda (or virtualenv) environment and activating it, before running `jupyter lab`.\n",
"\n",
"\n",
"If you look in the Anaconda prompt (PC) or the Terminal (Mac), you should see `(llms)` in your prompt where you launch `jupyter lab` - that's your clue that the llms environment is activated.\n",
"If you look in the Anaconda prompt (PC) or the Terminal (Mac), you should see `(llms)` in your prompt where you launch `jupyter lab` - that's your clue that the llms environment is activated.\n",
"\n",
"\n",
"If you are in an activated environment, the next thing to try is to restart everything:\n",
"If you are in an activated environment, the next thing to try is to restart everything:\n",
"1. Close down all Jupyter windows, like this\n",
"1. Close down all Jupyter windows, like this one\n",
"2. Exit all command prompts / Terminals / Anaconda\n",
"2. Exit all command prompts / Terminals / Anaconda\n",
"3. Repeat Part 5 from the SETUP instructions to begin a new activated environment and launch jupyter lab\n",
"3. Repeat Part 5 from the SETUP instructions to begin a new activated environment and launch `jupyter lab` from the `llm_engineering` directory \n",
"4. Kernel menu >> Restart Kernel and Clear Outputs of All Cells\n",
"4. Come back to this notebook, and do Kernel menu >> Restart Kernel and Clear Outputs of All Cells\n",
"5. Come back to this notebook and try the cell below again.\n",
"5. Try the cell below again.\n",
"\n",
"\n",
"If **that** doesn't work, then please contact me! I'll respond quickly, and we'll figure it out. Please run the diagnostics (last cell in this notebook) so I can debug. If you used Anaconda, it might be that for some reason your environment is corrupted, in which case the simplest fix is to use the virtualenv approach instead (Part 2B in the setup guides)."
"If **that** doesn't work, then please contact me! I'll respond quickly, and we'll figure it out. Please run the diagnostics (last cell in this notebook) so I can debug. If you used Anaconda, it might be that for some reason your environment is corrupted, in which case the simplest fix is to use the virtualenv approach instead (Part 2B in the setup guides)."
]
]
},
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c8c0bb3-0e94-466e-8d1a-4dfbaa014cbe",
"metadata": {},
"outputs": [],
"source": [
"# Some quick checks that your Conda environment or VirtualEnv is as expected\n",
" print(\"Neither Anaconda nor Virtualenv seems to be active. Did you start jupyter lab in an Activated environment? See Setup Part 5.\")"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
@ -44,7 +72,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"# This should run with no output - no import errors.\n",
"# And now, this should run with no output - no import errors.\n",
"# Import errors might indicate that you started jupyter lab without your environment activated? See SETUP part 5.\n",
"# Import errors might indicate that you started jupyter lab without your environment activated? See SETUP part 5.\n",
"# Or you might need to restart your Kernel and Jupyter Lab.\n",
"# Or you might need to restart your Kernel and Jupyter Lab.\n",
"# Or it's possible that something is wrong with Anaconda, in which case we may have to use virtualenv instead.\n",
"# Or it's possible that something is wrong with Anaconda, in which case we may have to use virtualenv instead.\n",
@ -65,7 +93,9 @@
"\n",
"\n",
"Note that the `.env` file won't show up in your Jupyter Lab file browser, because Jupyter hides files that start with a dot for your security; they're considered hidden files. If you need to change the name, you'll need to use a command terminal or File Explorer (PC) / Finder Window (Mac). Ask ChatGPT if that's giving you problems, or email me!\n",
"Note that the `.env` file won't show up in your Jupyter Lab file browser, because Jupyter hides files that start with a dot for your security; they're considered hidden files. If you need to change the name, you'll need to use a command terminal or File Explorer (PC) / Finder Window (Mac). Ask ChatGPT if that's giving you problems, or email me!\n",
"\n",
"\n",
"If you're having challenges creating the `.env` file, we can also do it with code! See the cell after the next one."
"If you're having challenges creating the `.env` file, we can also do it with code! See the cell after the next one.\n",
"\n",
"It's important to launch `jupyter lab` from the project root directory, `llm_engineering`. If you didn't do that, this cell might give you problems."
]
]
},
},
{
{
@ -282,8 +312,8 @@
"\n",
"\n",
"## Please run this next cell to gather some important data\n",
"## Please run this next cell to gather some important data\n",
"\n",
"\n",
"Please run the next cell; it should take a minute or so to run (mostly the network test).\n",
"Please run the next cell; it should take a minute or so to run. Most of the time is checking your network bandwidth.\n",
"Rhen email me the output of the last cell to ed@edwarddonner.com. \n",
"Then email me the output of the last cell to ed@edwarddonner.com. \n",
"Alternatively: this will create a file called report.txt - just attach the file to your email."
"Alternatively: this will create a file called report.txt - just attach the file to your email."