Welcome to this tutorial!
This repository contains code, exercises and explanations to help you turn a notebook solution into an operational machine learning application.
All the information can be found in the /exercises
folder. If you feel like there is something missing, or you're getting stuck on a technical problem, try and find a solution with your neighbour! Still can't figure it out? Ask the host!
Before we get started, we need to make sure you have access to a coding environment and have all necessary dependencies installed, so you can edit and run the code.
- (optional) Fork this repository so you can make changes to it. This will be useful if you want to work on the bonus CI/CD exercise.
There are two options you may choose from:
- Using Github Codespaces (Recommended)
- Using your own editor (e.g. VSCode)
These are the steps to get started with GitHub Codespaces:
- Navigate to this repository on GitHub.
- Click on the "Code" button on the right above the folder structure
- Select "Codespaces"
- Click on "Open Codespaces on main"
- Wait until your environment is set up (this may take a while) and your terminal is ready
- Wait a little bit longer, as another setup step may run
- The setup is done when you you can run
docker
in a terminal and get a list of commands - Run the following in a terminal to check if all went well:
python -c "import turbine_power"
No output? Good!
Getting a ModuleNotFoundError
? Not good... The automated setup didn't work. Please follow the Installing dependencies section below to set up the environment manually.
These are the steps to get started with your own editor (e.g. VSCode):
- Open a terminal
- Clone the repository
git clone https://github.com/godatadriven/mlops-workshop.git
- Open this folder (the cloned repo) in your editor
- Open a terminal in this folder
- Continue setting up in the "Installing dependencies" section below
Assuming you've set up your editor with one of the above options, install the necessary dependencies as follows:
- Create a virtual environment
python -m venv .venv
- Activate the environment
source .venv/bin/activate
- Install the dependencies
pip install -e ".[dev]"
Not working? Double check in which folder you are running this in. It should contain pyproject.toml
and setup.cfg
.
- Install the environment as kernel so we can use it in Jupyter
ipython kernel install --name ".venv" --user
- Check if all went well:
python -c "import turbine_power"
No ouput? Good!
Getting a ModuleNotFoundError
? Not good... Double check if you went through all the steps above, check with your neighbours, or ask the host.
Note: If you're getting installation errors, consider switching to Codespaces if you're working in your own editor.
- Now your environment should be ready! Make sure, in all of the following, that you are running code within this environment (
.venv
). That means, if you create a new terminal, make sure to runsource .venv/bin/activate
again. That also means, if you run a notebook, select.venv
as the kernel.
Note: You may have to install the kernel first, depending on which editor you use. In the above instructions, we are assuming a VSCode environment, in which this is not necessary.
Find the exercises in the /exercises
folder. Start with the first notebook and go from there!