Skip to main content

models

Paperspace Gradient CLI reference guide for models.

create

Create a model for a URL or Dataset ID

Examples

gradient models create \
--name "New Model" \
--modelType "Tensorflow" \
--datasetRef "dsj1g16f1z67jai"

Options

NameTypeAttributesDescription
--namestringrequiredModel name
--modelTypestringrequiredModel type: Tensorflow, ONNX, Custom
--datasetRefstringrequiredDataset ref to associate model with
--projectIdstringoptionalID of a project
--modelSummarystringoptionalModel summary
--notesstringoptionalAdditional notes
--tagstringoptionalOne or many tags that you want to add
--tagsstringoptionalTags separated by comma
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Model created with ID: moseiu8dirfro8k

details

Show model details

Examples

gradient models details \
--id "moseiu8dirfro8k"

Options

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

Response

+------------------+-----------------+
| ID | moseiu8dirfro8k |
+------------------+-----------------+
| Name | New Model |
| Project ID | None |
| Experiment ID | None |
| Model Type | Tensorflow |
| URL | None |
| Deployment State | None |
| Tags | |
+------------------+-----------------+

list

List models with optional filtering

Examples

gradient models list

Options

NameTypeAttributesDescription
--experimentIdstringoptionalFilter by experiment ID
--projectIdstringoptionalFilter by project ID
--tagstringoptionalFilter by tag
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

+-----------+-----------------+------------+------------+---------------+
| Name | ID | Model Type | Project ID | Experiment ID |
+-----------+-----------------+------------+------------+---------------+
| New Model | moseiu8dirfro8k | Tensorflow | None | None |
+-----------+-----------------+------------+------------+---------------+

download

Download model

Examples

gradient models download \
--id "moseiu8dirfro8k" \
--destinationDir "./"

Options

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

Response

Downloading: data.txt

upload

Upload a model file or directory

Examples

gradient models upload fashion-mnist.onnx \
--name "New Model" \
--modelType "ONNX"

Options

NameTypeAttributesDescription
--namestringrequiredModel name
--modelTypestringrequiredModel type: Tensorflow, ONNX, Custom
--projectIdstringoptionalID of a project
--clusterIDstringoptionalID of a cluster
--modelSummarystringoptionalModel summary
--notesstringoptionalAdditional notes
--tagstringoptionalOne or many tags that you want to add
--tagsstringoptionalTags separated by comma
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

100% (408542 of 408542) |#####################################################################################################################| Elapsed Time: 0:00:00 Time:  0:00:00
Model uploaded with ID: moc0ackf1ivmmy

delete

Delete a model

Examples

gradient models delete \
--id "moseiu8dirfro8k"

Options

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

Response

Model deleted

tags add

Add tags to ml model

Examples

gradient models tags add \
--id "moseiu8dirfro8k" \
--tag "import202203"

Options

NameTypeAttributesDescription
--idstringrequiredModel ID
--tagstringoptionalOne or more tags that you want to add to ml model
--tagsstringoptionalSeparated by comma tags taht you want to add to ml model
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Tags added to ml model

tags remove

Remove tags from ml model

Examples

gradient models tags remove \
--id "moseiu8dirfro8k" \
--tag "import202203"

Options

NameTypeAttributesDescription
--idstringrequiredModel ID
--tagstringoptionalOne or more tags that you want to add to ml model
--tagsstringoptionalSeparated by comma tags taht you want to add to ml model
--apiKeystringoptionalAPI key to use this time only
--optionsFilestringoptionalPath to YAML with predefined options
--createOptionsFilestringoptionalGenerate template options file

Response

Tags removed from ml model