Installation Tutorial¶
This tutorial includes instruction on installation and package setup for the progressive learning repository. After following the steps below, you should have the progressive learning and necessary packages installed on your own machine.
1. Installation¶
Goal: Clone the repository on your local machine and understand what it includes¶
Let’s clone the repository¶
Steps: 1. Open the command line on your local machine (called “Terminal” on Mac) 2. Navigate to the location where you’d like to put the repository. 1. Find a location in a file explorer (“Finder” on Mac) 2. Type “cd” in the command prompt 3. Drag and drop the folder where you’d like to place the repository from the file explorer to the command line The command prompt should show something like: bstraus@BS-Mac ~ % cd /Users/bstraus/Desktop
3. Type git clone REPOSITORY_URL
where
REPOSITORY_URL
is replaced by the URL of the neurodata/ProgLearn repository (as of 2022-01-05, it is https://github.com/neurodata/ProgLearn) 4. Wait for the process to finish. You’ll know it’s done because you’ll see the first part of the command prompt pop up. For me, that looks like: bstraus@BS-Mac ~ %
Congrats! You’ve now cloned the progressive-learning repository.
Last step here, install the package with: python3 setup.py install
Let’s take a tour¶
Currently, you’re looking at this tutorial, which lives in progressive-learning/tutorials/. This folder also currently houses a notebook running one of the experiments.
In the root directory, we have:
/proglearn
: the heart of the repository containing the python files for the progressive learning classes. We’ll focus on the UncertaintyForest class which lives in theforest.py
file in this directory./proglearn/tests
: contains python files for various tests./docs
: contains files that will tell you requirements (we’ll use this later), contributing guidelines, and some other administrative files./docs/experiments
: contains notebooks and results for many of the experiments that utilize the functions/classes in the repository./docs/tutorials
: contains python notebooks (like this one) that will guide you through side projects.
In future notebooks of this tutorial, we’ll discuss how to prepare to run the code for the UncertaintyForest class. That code lives in the progressive-learning/proglearn/forest.py
file.
But, for now, we’ll prepare to do that by making a virtual environment and installing the required packages to run that code.
You’re done with part 1 of the tutorial!¶
Move on to part 2¶
2: Package Setup¶
Goal: Create a virtual environment and install requirements per requirements.txt in order to run the UncertaintyForest class¶
First, let’s create the virtual environment¶
Note: that the following instructions were designed for Mac operating systems. If you’re running another OS, look for the equivalent steps tailored to that OS.
Open the command line on your local machine (called “Terminal” on Mac)
Navigate to the location where you’d like to put the virtual environment.
Find a location in a file explorer (“Finder” on Mac)
Type “cd” in the command prompt
Drag and drop the folder where you’d like to place the virtual environment from the file explorer to the command line The command prompt should show something like:
bstraus@BS-Mac ~ % cd /Users/bstraus/Desktop
Create the virtual environment by typing
python3 -m venv UncertaintyForestEnv
Next, let’s install the requirements for running the UncertaintyForest class¶
Activate the virtual environment by typing
source UncertaintyForestEnv/bin/activate
Navigate to the folder
progressive-learning/docs/
. You can do this with the same process as in step 2 above.Install necessary packages by typing
pip install -r requirements.txt
You’ll also want to install the following packages by typing the code below: 1.
pip install jupyterlab
2.pip install notebook
3.pip install numpy scipy pandas scikit-learn matplotlib seaborn joblib keras tensorflow tqdm ipywidgets
You now have set up your virtual environment and installed necessary packages. Note that you’ll need to activate your virtual environment each time you want to run things for this class. You can do this easily by repeating steps 1, 2, and 4.