Skip to main content
Version: 0.94

Setup and Installation

Snorkel Flow Python SDK

The snorkelflow SDK can be provided in several formats for installation on the Snorkel Flow host server or remote nodes:

  • A wheel file, e.g., snorkelflow-xx.yy.zz-py3-none-any.whl
  • A Docker image containing the wheel file

Installation instructions for each distribution method can be found below.

tip

In all cases, we recommend using a Python or Anaconda virtual environment.

note

The snorkelflow SDK requires Python 3.8+ but recommends Python 3.10+

note

The snorkelflow wheel requires pip >= 19.0 ,
run python3 -m pip install --upgrade pip to upgrade pip.

Installing from a wheel file

Install the snorkelflow package by running:

python3 -m pip install path/to/snorkelflow-xx.yy.zz-py3-none-any.whl

replacing path/to/snorkelflow-xx.yy.zz-py3-none-any.whl with the correct path and file name. There are a number of extras defined for the snorkelflow SDK which specifies external libraries needed for extra functionality.

  • data: dependencies needed for the dataset loading utilities in snorkelflow
  • debug: dependencies needed to generate support bundles for debugging performance
  • kubernetes: dependencies needed to generate Kubernetes configurations
  • sdk: dependencies needed for the software development kit interface

For example, to install the sdk extras, run:

python3 -m pip install 'path/to/snorkelflow-xx.yy.zz-py3-none-any.whl[sdk]'

replacing path/to/snorkelflow-xx.yy.zz-py3-none-any.whl with the correct path and file name. Installing from a Docker image The snorkelflow SDK will be bundled in a Docker image called snorkelai/snorkelflow-whl. Extract the snorkelflow SDK by running:

VERSION=<snorkelflow version>
LOCAL_WHL_PATH=/tmp/whl
mkdir -p $LOCAL_WHL_PATH
CONTAINER_ID=$(docker create snorkelai/snorkelflow-whl:$VERSION bash)
docker cp $CONTAINER_ID:/ $LOCAL_WHL_PATH

replacing <snorkelflow version> with the provided version of snorkelflow. Once the wheel file is extracted, follow the instructions for Installing from a wheel file using the wheel file located in $LOCAL_WHL_PATH.

Authenticating your SDK Client

SDK usage outside the Snorkel Flow platform requires authentication via an API key. Instructions on SDK authentication can be found in Snorkel Flow API Authentication.

Installing from a standalone Anaconda channel

Instructions for installation from a standalone Anaconda channel are provided separately by Snorkel AI.

Snorkel Flow Platform

Installing Snorkel Flow

Follow the Snorkel Flow Kubernetes Installation overview to begin installing the platform.