Practicum AI git and GitHub.com

Summary

Applied AI is powered by code–Python code.

Jupyter logoIn 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.

git logoAs 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.

GitHub logoIn 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:

  1. Login to a Jupyter Lab environment.
  2. Accept a GitHub Classroom assignment and clone the assignment into their Jupyter environment
  3. Use the git flow workflow to edit a file, add the file, commit the changes and push changes to a remote repository.
  4. 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 logoJupyter 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:

  1. 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.
  2. Atlas (USDA ARS)
  3. To use GitHub CodeSpaces
    • Best for: the Getting Started and Python courses.
    • Drawbacks: Currently does not provide GPU access.
  4. 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

  1. 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.

  1. 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: Screenshot of the authorization question when accepting an assignment for the first time

Then you will need to accept the assignment:

Screenshot of the accept assignment page in GitHub Classroom

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.

Screenshot of the ready to go page showing the link to your repository

Launch your Codespace

Once you have the repository, you can launch the GitHub Codespace.

Screenshot of the steps to launch a Codespace

  1. Click the green “<> Code” button
  2. Click the Codespaces tab
  3. 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.

Optional Content / Additional Resources