Summary
Applied AI is powered by code–Python code.
In most cases, especially in the early testing and development stages, AI code is most easily written, and run, using Jupyter Notebooks, an open standard allowing documents to mix formatted text and images with interactive code and the results from running that code.
Part of this module will also get you up and running in one of many available Jupyter systems. We will walk you through some of the options and provide step-by-step instructions to get started.
As a best practice, code should reside in a version control system. These systems track changes to files, enforce good coding practices and foster collaboration and sharing. The most widely used version control system today is
git
. Git is free and open source.
In addition to using
git
, it is possible to use one of many online git
hosting sites. For Practicum AI we use GitHub.com. There are other options, but GitHub is one of the leading online hosting companies and offers educational discounts for students and faculty. This module will get you setup with a GitHub.com account and walk you through your first experience of using git
.
Objectives
By the end of this module, students will be able to:
- Login to a Jupyter Lab environment.
- Accept a GitHub Classroom assignment and clone the assignment into their Jupyter environment
- Use the git flow workflow to edit a file, add the file, commit the changes and push changes to a remote repository.
- Navigate the GitHub discussion board and issue system for getting help and reporting problems.
Read
Setting up your Jupyter environment
There are tailored instructions depending on how you are using this course and the compute environment that you will use.
Jupyter is an interactive coding environment that allows you to easily write and run code blocks, nicely formatted documentation, and develop more complex applications. Because much of the AI workflow is exploring data and testing different models and parameters, the interactive, visual nature of Jupyter notebooks makes them ideal for the task and the industry standard. Most online tutorials and documentation make use of Jupyter Notebooks.
Because there are many pathways to the Practicum AI courses, there are many options for how best to run the code for the course. We strive to make it easy to select the best option for you, though also acknowledge that your best option may change over time based on your access to resources and the tasks you are trying to accomplish. By providing information on multiple options, we hope to support you on a diverse array of industry leading resources.
The main challenge is that GPUs (Graphical Processing Units–named because their original use was rendering the graphics for computer games) are required for most AI projects. GPUs, especially those specialized for AI work, are expensive and require a lot of power and cooling to run. Therefore, there is limited access to free GPU resources.
Follow the links below for details on your specific environment:
- If you have a HiPerGator account (University of Florida)
- Best for: people with HiPerGator accounts. Provides access to powerful GPU resources and all AI workflows from learning Python through the most demanding of AI applications.
- Drawbacks: Need a HiPerGator account. Use outside of courses/workshops requires investment.
- Atlas (USDA ARS)
- To use GitHub CodeSpaces
- Best for: the Getting Started and Python courses.
- Drawbacks: Currently does not provide GPU access.
- Google Colaboratory
- Best for: quick and easy start up. Some free access to GPUs for courses.
- Drawbacks: Limited GPU time for free tier. No direct integration with git/GitHub.
Watch
- Introduction to git
Complete
Now that you have some understanding of Jupyter Notebooks and git
, this exercise will give you a chance to use git
.
- To complete this assignment, accept the assignment and complete the directions.
Accepting a GitHub Classroom Assignment
To start Jupyter in a GitHub Codespace, click this link to accept the Introduction to Git assignment.
Once you click the link, you will need to authorize GitHub Classroom to access your account:
Then you will need to accept the assignment:
GitHub will now setup your personal repository.
This sometimes takes a minute or two. Refresh the page to see if it is finished.
Refresh the page, and there should be a link to your repository.
Launch your Codespace
Once you have the repository, you can launch the GitHub Codespace.
- Click the green “
<> Code
” button - Click the Codespaces tab
- Click the “Create codespace on main” button
You should see a page similar to this. Some key parts of the page are noted.
Open the README.md file and follow the directions
Most of the hands-on exercise is in the 02_exercise.ipynb file.