Skip to main content

workflows

Paperspace Gradient CLI reference guide for workflows.

create

Create workflow

Examples

gradient workflows create \
--name "NewWorkflow" \
--projectId "prjpkflqz"

Options

NameTypeAttributesDescription
--namestringrequiredWorkflow name
--projectIdstringrequiredProject ID
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+--------------+--------------------------------------+
| Name | ID |
+--------------+--------------------------------------+
| New-Workflow | 075615ac-a036-408c-a95e-36e5b18c73aa |
+--------------+--------------------------------------+

get

Get workflow info

Examples

gradient workflows get \
--id "075615ac-a036-408c-a95e-36e5b18c73aa"

Options

NameTypeAttributesDescription
--idstringrequiredWorkflow ID
--show-runsoptionalFetch runs
--runstringoptionalSpecify workload run
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

{
"id": "075615ac-a036-408c-a95e-36e5b18c73aa",
"name": "New-Workflow",
"dtCreated": "2022-03-22T08:10:29.677Z",
"dtModified": "2022-03-22T08:10:29.677Z"
}

list

List workflows

Examples

gradient workflows list \
--projectId "prjpkflqz"

Options

NameTypeAttributesDescription
--projectIdstringrequiredProject ID
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+---------------+--------------------------------------+
| Name | ID |
+---------------+--------------------------------------+
| New-Workflow | 075615ac-a036-408c-a95e-36e5b18c73aa |
+---------------+--------------------------------------+

logs

List logs for specific workflow

Examples

gradient workflows logs \
--id "075615ac-a036-408c-a95e-36e5b18c73aa" \
--run 1

Options

NameTypeAttributesDescription
--idstringrequiredWorkflow ID
--runstringrequiredSpecify workload run
--logIdstringoptionalWorkflow log ID
--lineintegeroptionalSpecific line number of logs
--limitintegeroptionalLimit of logs to fetch
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+Workflows wfrjaedc275373ec4d239f3ea1af029dfd60 logs------------------------------------------------------------------------------------------------------------------------------------+
| LINE | MESSAGE |
+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | Collecting scipy==1.3.3 |
| 2 | Downloading https://files.pythonhosted.org/packages/54/18/d7c101d5e93b6c78dc206fcdf7bd04c1f8138a7b1a93578158fa3b132b08/scipy-1.3.3-cp36-cp36m-manylinux1_x86_64.whl (25.2MB) |
| 3 | Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from scipy==1.3.3) (1.16.4) |
| 4 | Installing collected packages: scipy |
| 5 | Successfully installed scipy-1.3.3 |
| 6 | WARNING: You are using pip version 19.1.1, however version 21.3.1 is available. |
| 7 | You should consider upgrading via the 'pip install --upgrade pip' command. |
| 8 | Collecting requests==2.22.0 |
| 9 | Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB) |
| 10 | Collecting chardet<3.1.0,>=3.0.2 (from requests==2.22.0) |
| 11 | Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) |
| 12 | Collecting certifi>=2017.4.17 (from requests==2.22.0) |
| 13 | Downloading https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl (149kB) |
| 14 | Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests==2.22.0) |
| 15 | Downloading https://files.pythonhosted.org/packages/56/aa/4ef5aa67a9a62505db124a5cb5262332d1d4153462eb8fd89c9fa41e5d92/urllib3-1.25.11-py2.py3-none-any.whl (127kB) |
| 16 | Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests==2.22.0) (2.6) |
| 17 | Installing collected packages: chardet, certifi, urllib3, requests |
| 18 | Successfully installed certifi-2021.10.8 chardet-3.0.4 requests-2.22.0 urllib3-1.25.11 |
| 19 | WARNING: You are using pip version 19.1.1, however version 21.3.1 is available. |
| 20 | You should consider upgrading via the 'pip install --upgrade pip' command. |
| 21 | Collecting Pillow==6.2.1 |
| 22 | Downloading https://files.pythonhosted.org/packages/10/5c/0e94e689de2476c4c5e644a3bd223a1c1b9e2bdb7c510191750be74fa786/Pillow-6.2.1-cp36-cp36m-manylinux1_x86_64.whl (2.1MB) |
| 23 | Installing collected packages: Pillow |
| 24 | Successfully installed Pillow-6.2.1 |
| 25 | WARNING: You are using pip version 19.1.1, however version 21.3.1 is available. |
| 26 | You should consider upgrading via the 'pip install --upgrade pip' command. |
+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

run

Run workflow spec

Examples

gradient workflows run \
--id "075615ac-a036-408c-a95e-36e5b18c73aa" \
--path "workflow-spec.yaml"

Options

NameTypeAttributesDescription
--idstringrequiredWorkflow ID
--clusterIdstringoptionalCluster ID
--pathstringrequiredPath to workflow specification
--inputPathstringoptionalPath to inputs
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Created workflow run wfr627e7d055e0146ad94677d32f9380991