Skip to main content

datasets

Paperspace Gradient CLI reference guide for datasets.

create

Create dataset

Examples

gradient datasets create \
--name "new_dataset_1" \
--storageProviderId "sp65qbxcrsgiv43"

Options

NameTypeAttributesDescription
--namestringrequiredDataset name
--storageProviderIdstringrequiredStorage provider ID
--descriptionstringoptionalDataset description
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Created dataset: ds7diuwj0av3tqy

details

Show dataset details

Examples

gradient datasets details \
--id "ds7diuwj0av3tqy"

Options

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

Response

+-----------------+------------------------------------+
| Name | new_dataset_1 |
+-----------------+------------------------------------+
| ID | ds7diuwj0av3tqy |
| Description | |
| StorageProvider | Gradient Managed (sp65qbxcrsgiv43) |
+-----------------+------------------------------------+

list

List datasets

Examples

gradient datasets list

Options

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

Response

+---------------+-----------------+------------------------------------+
| Name | ID | Storage Provider |
+---------------+-----------------+------------------------------------+
| new_dataset_1 | ds7diuwj0av3tqy | Gradient Managed (sp65qbxcrsgiv43) |
+---------------+-----------------+------------------------------------+

update

Update dataset

Examples

gradient datasets update \
--id "ds7diuwj0av3tqy" \
--description "Updated dataset description"

Options

NameTypeAttributesDescription
--idstringrequiredDataset ID
--namestringoptionalDataset name
--descriptionstringoptionalDataset description
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Updated dataset: ds7diuwj0av3tqy

delete

Delete dataset

Examples

gradient datasets delete \
--id "dsltzdafwejmqlq"

Options

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

Response

Deleted dataset: dsltzdafwejmqlq

files get

Get files

Examples

gradient datasets files get \
--id "dsj1g16f1z67jai:0z7o247" \
--target-path "~/downloads"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--source-pathstringoptionalFile or directory to get
--target-pathstringrequiredTarget directory path
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

files list

List files

Examples

gradient datasets files list \
--id "dsj1g16f1z67jai:xbreynt"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--pathstringoptionalSub-directory to delete
--recursivestringoptionalRecursive list content
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+----------+------+
| Name | Size |
+----------+------+
| data.txt | 4 |
+----------+------+

files put

Put files

Examples

gradient datasets files put \
--id "dsj1g16f1z67jai:xbreynt" \
--source-path "data.txt"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--source-pathstringrequiredFile or directory to get
--target-pathstringoptionalTarget directory path
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

files delete

Delete files

Examples

gradient datasets files delete \
--id "dsj1g16f1z67jai:0z7o247"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--pathstringoptionalSub-directory to delete
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

versions create

Create dataset version

Examples

gradient datasets versions create \
--id "ds7diuwj0av3tqy"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--messagestringoptionalDataset version message
--source-pathstringoptionalFiles to put into dataset versioning (setting this will commit the version)
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Created dataset version: ds7diuwj0av3tqy:dk0c3k1

versions commit

Commit dataset version

Examples

gradient datasets versions commit \
--id "ds7diuwj0av3tqy:dk0c3k1"

Options

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

Response

Committed dataset version: ds7diuwj0av3tqy:dk0c3k1

versions details

Show dataset version details

Examples

gradient datasets versions details \
--id "ds7diuwj0av3tqy:dk0c3k1"

Options

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

Response

+-----------+-------------------------+
| ID | ds7diuwj0av3tqy:dk0c3k1 |
+-----------+-------------------------+
| Message | |
| Committed | true |
| Tags | |
+-----------+-------------------------+

versions list

List dataset versions

Examples

gradient datasets versions list \
--id "ds7diuwj0av3tqy"

Options

NameTypeAttributesDescription
--idstringrequiredDataset ID
--isCommittedbooleanoptionalShow filter by committed status
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+-------------------------+---------+------+
| ID | Message | Tags |
+-------------------------+---------+------+
| ds7diuwj0av3tqy:dk0c3k1 | | |
+-------------------------+---------+------+

versions update

Update dataset version

Examples

gradient datasets versions update \
--id "ds7diuwj0av3tqy:dk0c3k1"

Options

NameTypeAttributesDescription
--idstringrequiredDataset version ID
--messagestringoptionalDataset version message
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Updated dataset version: ds7diuwj0av3tqy:dk0c3k1

versions delete

Delete dataset version

Examples

gradient datasets versions delete \
--id "ds7diuwj0av3tqy:dk0c3k1"

Options

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

Response

Deleted dataset version: ds7diuwj0av3tqy:dk0c3k1