To begin using Gradient, follow these preliminary steps:
Optional: Create a team to invite collaborators
Now you can create Notebooks, Workflows, Deployments, and more!
When you first log into the Paperspace Console, you can select Gradient from the product dropdown:
Projects help organize your work. To get started, just choose a name and click create.
You can stop, start, fork, and swap out the instance type anytime. Choose from a wide selection of pre-configured templates or bring your own.
You can automate machine learning tasks using Workflows. You can define a workflow once and use it repeatedly to perform simple or complex MLOps activities, such as pre-processing data, training models, and creating or updating deployments.
Follow the instructions on the page to install the Gradient Github App into your Github account, and select the git repo you want to associate with project. Alternatively you can select one of the sample repos.
If you choose to use your own git repo, you will be prompted to add a YAML file to your repo that defines the Workflow steps.
Create a Workflow
This step is only needed if you didn't already create a default
demo workflow in the web interface. Specify a name for the Workflow and a
projectId. Use the
projectId from the project you created earlier.
gradient workflows create \--name <your-workflow-name> \--projectId <your-project-id>
To see a list of your projects and
gradient projects list. For a list of Workflows within a project run
gradient workflows list --projectId <your-project-id>.
Download or copy the sample Workflow Spec to your computer
Here is the Workflow Spec for reference:
jobs:CloneRepo:resources:instance-type: C5outputs:repo:type: volumeuses: git-[email protected]with:url: https://github.com/NVlabs/stylegan2.gitStyleGan2:resources:instance-type: P4000needs:- CloneRepoinputs:repo: CloneRepo.outputs.repooutputs:generatedFaces:type: datasetwith:ref: demo-datasetuses: [email protected]with:script: |-pip install scipy==1.3.3pip install requests==2.22.0pip install Pillow==6.2.1cp -R /inputs/repo /stylegan2cd /stylegan2python run_generator.py generate-images \--network=gdrive:networks/stylegan2-ffhq-config-f.pkl \--seeds=6600-6605 \--truncation-psi=0.5 \--result-dir=/outputs/generatedFacesimage: tensorflow/tensorflow:1.14.0-gpu-py3
Place the contents in a file named
Run the Workflow from the CLI
The following command will run an instance of the Workflow in your project. Be sure to replace
<your-workflow-id> with your Workflow ID.
gradient workflows run \--id <your-workflow-id> \--path ./workflow.yaml
Behind the scenes, your Workflow will be executed on the Gradient public cluster. Congratulations! You ran your first Workflow on Gradient 🚀