Gradient Docs
Gradient HomeHelp DeskCommunitySign up free
1.0.0
1.0.0
  • About Paperspace Gradient
  • Get Started
    • Quick Start
    • Core Concepts
    • Install the Gradient CLI
    • Common Errors
  • Tutorials
    • Tutorials List
      • Getting Started with Notebooks
      • Train a Model with the Web UI
      • Train a Model with the CLI
      • Advanced: Distributed training sample project
      • Registering Models in Gradient
      • Using Gradient Deployments
      • Using Custom Containers
  • Notebooks
    • Overview
    • Using Notebooks
      • The Notebook interface
      • Notebook metrics
      • Share a Notebook
      • Fork a Notebook
      • Notebook Directories
      • Notebook Containers
        • Building a Custom Container
      • Notebook Workspace Include Files
      • Community (Public) Notebooks
    • ML Showcase
    • Run on Gradient (GitHub badge)
  • Projects
    • Overview
    • Managing Projects
    • GradientCI
      • GradientCI V1 (Deprecated)
  • Workflows
    • Overview
      • Getting Started with Workflows
      • Workflow Spec
      • Gradient Actions
  • Experiments
    • Overview
    • Using Experiments
      • Containers
      • Single-node & multi-node CLI options
      • Experiment options
      • Gradient Config File
      • Environment variables
      • Experiment datasets
      • Git Commit Tracking
      • Experiment metrics
        • System Metrics
        • Custom Metrics
      • Experiment Logs
      • Experiment Ports
      • GradientCI Experiments
      • Diff Viewer
      • Hyperparameter Tuning
    • Distributed Training
      • Distributed Machine Learning with Tensorflow
      • Distributed Machine Learning with MPI
        • Distributed Training using Horovod
        • Distributed Training Using ChainerMN
  • Jobs
    • Overview
    • Using Jobs
      • Stop a Job
      • Delete a Job
      • List Jobs
      • Job Logs
      • Job Metrics
        • System Metrics
        • Custom Metrics
      • Job Artifacts
      • Public Jobs
      • Building Docker Containers with Jobs
  • Models
    • Overview
    • Managing Models
      • Example: Prepare a TensorFlow Model for Deployments
      • Model Path, Parameters, & Metadata
    • Public Models
  • Deployments
    • Overview
    • Managing Deployments
      • Deployment Containers
        • Custom Deployment Containers
      • Deployment States
      • Deployment Logs
      • Deployment Metrics
      • A Deployed Model's API Endpoint
        • Gradient + TensorFlow Serving
      • Deployment Autoscaling
      • Optimize Models for Inference
  • Data
    • Types of Storage
      • Managing Data in Gradient
        • Managing Persistent Storage with VMs
    • Storage Providers
    • Versioned Datasets
    • Public Datasets Repository
  • TensorBoards
    • Overview
    • Using Tensorboards
      • TensorBoards getting started with Tensorflow
  • Metrics
    • Metrics Overview
    • View and Query Metrics
    • Push Metrics
  • Secrets
    • Overview
    • Using Secrets
  • Gradient SDK
    • Gradient SDK Overview
      • Projects Client
      • Experiments Client
      • Models Client
      • Deployments Client
      • Jobs Client
    • End to end tutorial
    • Full SDK Reference
  • Instances
    • Instance Types
      • Free Instances (Free Tier)
      • Instance Tiers
  • Gradient Cluster
    • Overview
    • Setup
      • Managed Private Clusters
      • Self-Hosted Clusters
        • Pre-installation steps
        • Gradient Installer CLI
        • Terraform
          • Pre-installation steps
          • Install on AWS
          • Install on bare metal / VMs
          • Install on NVIDIA DGX
        • Let's Encrypt DNS Providers
        • Updating your cluster
    • Usage
  • Tags
    • Overview
    • Using Tags
  • Machines (Paperspace CORE)
    • Overview
    • Using Machines
      • Start a Machine
      • Stop a Machine
      • Restart a Machine
      • Update a Machine
      • Destroy a Machine
      • List Machines
      • Show a Machine
      • Wait For a Machine
      • Check a Machine's utilization
      • Check availability
  • Paperspace Account
    • Overview
    • Public Profiles
    • Billing & Subscriptions
    • Hotkeys
    • Teams
      • Creating a Team
      • Upgrading to a Team Plan
  • Release Notes
    • Product release notes
    • CLI/SDK Release notes
Powered by GitBook
On this page
  • Creating a Job
  • Job Parameters Complete List
  1. Jobs

Using Jobs

PreviousOverviewNextStop a Job

Last updated 3 years ago

Jobs have been replaced by a more general framework called Workflows. For the latest info go to .

Creating a Job

Jobs can be submitted via the Job Builder. There are a variety of optional and required options for your job including the instance type, the command, the container, etc. Note: At the top of the screen, you'll see a few job presets which will give a sense for how these options work.

  • Machine Type. What type of instance to run your Job on. We recommend starting with a GPU+. Many Jobs benefit from a machine with a GPU, but some can run just using a CPU.

  • Container. Jobs are run within a docker container. You can run a public or private container. Learn more .

  • Workspace. The workspace is the collection of code that is run. It can be a Git repository (public or private), your local working directory (if you are using the CLI) which is uploaded to the docker container during the job running process, or none (default value).

  • Command. The command is the entry point to the container. This is the line of code that will kick off your Job. It could be a bash script ./run.sh or python main.py as just some examples.

  • Custom Metrics. Enter a list of custom metrics to use with Gradient's , such as percent_failure or percent_success.

Once you have examined or specified the parameters, hit "Submit Job" and watch the Job run!

The Job Builder is great for getting started with basic tasks. For more advanced workflows, we recommend using the CLI which offers more flexibility.

Syntax

gradient jobs create <namespace> <command> [options...]

Job Parameters Basics

  • Machine Type: Such as --P100 or --C7 or --TPU

  • Container: Such as --tensorflow/tensorflow:1.5.1-gpu

  • Command: Such as "./do.sh"

Example Use

gradient jobs create \
    --name "my job" \
    --container "http://dockerhub.com/mycontainer" \
    --machineType "P5000" \
    --command "/paperspace/run.sh"
    --projectId "someProjectID"

Job Parameters Complete List

Argument

Default

Description

name

[required]

Job name

projectId

[required]

Project ID

machineType

K80

An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', 'P100', or 'TPU'.

container

paperspace/tensorflow-python

A reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if committed the hostname defaults to that of the public Docker Hub registry. An example docker image reference: docker.io/mynamespace/myimage:mytag. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)

command

Job command/entrypoint

workspace

Path to workspace directory. (Soon also will support a path to a workspace archive or git repository URL.)

workspaceArchive

Path to workspace archive. (Currently being deprecated in an upcoming version.)

workspaceUrl

Project git repository URL. (Currently being deprecated in an upcoming version.)

workingDirectory

Working directory for the experiment

experimentId

Experiment Id

jobEnv

Environmental variables in JSON String Format. Example:

{ "HKS_EPOCHS": 1, "HKS_MAX_EVALS": 4, "DATASET_SIZE": 10000 }

project

$CWD

The name of the project for this job. If not provided, this is taken from the .ps_project/config.json file, or the current directory name.

apiKey

API key to use this time only

ignoreFiles

Ignore certain files from uploading

Environment variables are available for use within the context of your job. The following host config options are currently exposed within the container:

$PS_HOST_PUBLIC_IP_ADDRESS - the public IP address of the host machine running the job

$PS_HOST_PRIVATE_IP_ADDRESS - the private IP address of the host machine running the job

$PS_HOSTNAME - the hostname of the host machine running the job

These can be used in conjunction with the ports option to send HTTP traffic to the job while it's in progress for example.

Workflows
here
statd client