Python Library

Welcome to the documentation for the Segmind Python API! This library allows you to programmatically interact with Segmind from within a Python script or application.

If you are new to Segmind, it might be worthwhile to check out the rest of the documentation, particularly the Platform, before continuing with the Python API.

Installation

  1. Install Segmind
Shell

2. Login to Segmind

Shell

Python Library (PIP package) is already installed for sessions on Segmind platform.

Instances (used for Jobs, Jupyter Lab and VS Code sessions) on Segmind come pre-installed and pre-configured with your settings.

Components

1. Experiment Tracking

The library provides segmind.tracking API written in python, running on top of the MLFLow tracking. Use the library to track machine learning experiments. For Tensorflow, Keras, PyTorch and Scikit Learn, we have special lightweight integrations to make it fast and easy to setup experiment tracking.

To learn more about Tracking module API endpoints, check outExperiment TrackingAPI reference docs.

2. Jobs*

Use segmind.jobs API to initiate a single instance of job on Segmind. It takes inputs such as base docker (environment definition), dataset to be mounted, code and compute requirements to execute it on the cluster.

3. CLI

Segmind provides command line interface to interact with the platform. Below you will find a description of each command, including the various options and arguments.

Usage

segmind [OPTIONS] COMMAND [ARGS] ...

i. Authentication & configuration

Command

Description

login

Login to Segmind account

logout

Log out of Segmind account

whoami

Display current user information

ii. Submit and manage jobs

Command

Description

job

Submit a new job to execute

stats

Display compute and storage performance statistics for a job

info

Displays information about a job, Eg. Start time, running time, instance details.

stop

Stop a job

ps

Display job statuses

iii. Cluster management (for Segmind Admins)

Works is in progress to add this. Check back later to know more about the cluster management endpoints.