Skip to main content

Pipe Breaks in Colab

This document contains the steps to run the pipe-breaks repo in Google Colab.

Prerequisites

  1. Personal Access Token for GitHub(for making commits and pushes through Google Colab)
  2. To create the Personal Access Token, follow the instructions over HERE
  3. To access the Terminal on Google Colab, you will need the Pro Tier subscription.
caution

Certain algorithms benefit from GPU, while starting a notebook, choose GPU as your Hardware Accelerator.

Since Google Colab has switched to a compute credits based mechanism now, make sure you disconnect the runtime once the algorithm has finished its execution.

Clone the pipe_breaks

  1. If running through colab, follow below steps
    1. Copy the https URL from GitHub repo of pipe_breaks
    2. Open a notebook, mount the Google Drive in the notebook using the following command.
      from google.colab import drive
      drive.mount('/content/drive')
    3. Once the drive is mounted, open the Terminal.
    4. cd into the directory where you wish to clone the repository
    5. Once in the desired repository, clone the repo.
      git clone https://github.com/gqc/pipe_breaks.git
  2. If running through local, just clone the repository in to the local machine.

Installing the pipe_breaks

  1. Once the repository is cloned, open the terminal in the notebook.
  2. cd into the pipe_breaks repo cloned on the Google Drive.
  3. Install the pipe_breaks

Configuring the inputs and settings

  1. Based on the utility and the algorithm that you wish to run, setup the appropriate files in the input_files folder and variables in settings.py
  2. Return to the terminal in the notebook, you are now ready to make runs.

Using the script_runner

  1. Once the necessary input files are put in their correct place, start the terminal.
  2. cd in the pipe_breaks repo cloned on the Google Drive.
  3. To see the help while running the CLI,
    python script_runner.py -h
    script-runner-help
  4. Choose the desired algorithm and utility and make the run.