# Gradient Workflows

## Overview

Gradient Workflows is a new and powerful way to build-out machine learning applications. Workflows utilize  [GitHub-action](https://docs.github.com/en/actions) style syntax via [YAML](https://en.wikipedia.org/wiki/YAML) files to easily create powerful automation.

Workflows is based on the [Argo runtime engine](https://github.com/argoproj/argo-workflows#what-is-argo-workflows), which is a container-native continuous delivery tool for Kubernetes, and makes it easy to build complex and scalable projects with an arbitrary number of discrete steps.&#x20;

![Examining the logs from a simple workflow.](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHZRFUkajubOAmgu6Rd-1459739844%2Fuploads%2FiwTp4BMnzpknI1h6u1Ap%2Freading%20workflow%20logs%20dark.gif?alt=media\&token=3d243bc8-2bb1-4d62-9a0f-afc63133a54d)

Workflows is used by ML Engineers to build-out deterministic machine learning pipelines.&#x20;

## Where to start

The best tutorial is the canonical Gradient Workflows Tutorial:

{% content-ref url="../get-started/tutorials-list/gradient-workflows-tutorial" %}
[gradient-workflows-tutorial](https://paperspace.gitbook.io/gradient/get-started/tutorials-list/gradient-workflows-tutorial)
{% endcontent-ref %}

![Gradient Workflows — Automate from idea to production](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-MjfERjgH12to_d9eoHL%2F-MjfE_o5yXArkXSKL0Uf%2FScreen%20Shot%202021-06-16%20at%2011.17.23%20AM.png?alt=media\&token=54de360b-9453-4b24-bd67-0f22c7a72890)

## Key Terminology

* **Workflow**: a named or unnamed entity that belongs to a team and project
  * Named workflows can be re-run with a default `workflow spec`, or be passed a new spec every time
* [**Workflow Spec**](https://paperspace.gitbook.io/gradient/explore-train-deploy/workflows/workflow-spec): a YAML list of jobs that is converted into an Argo template and run on the Gradient distributed runtime engine.
* [**Job**](https://paperspace.gitbook.io/gradient/explore-train-deploy/workflow-spec#jobs): self-contained part of a workflow spec that is similar to an Argo step
  * Jobs can define inputs, outputs, and their own environment variables
  * Jobs can require other jobs via "needs" and collect/pass info between jobs
  * Jobs can be implemented with an action via "use"
* [**Action**](https://paperspace.gitbook.io/gradient/explore-train-deploy/workflows/gradient-actions): a self-contained, composable set of code building blocks that can perform specific actions within a machine learning project.&#x20;
  * Actions can receive parameters (e.g., args, image) within the job step via the "with" argument
  * E.g., `container@v1` action = run a container, load inputs, and produce outputs
* [**Workflow Run**](https://paperspace.gitbook.io/gradient/explore-train-deploy/workflow-spec#example-workflow-run-output): the implementation of a workflow
  * The most basic run requires a `workflowId` and `clusterId` - most will also include a workflowSpec, and the inputs to be passed into the workflow
  * The workflow run contains everything needed for the workflow to actually be executed, i.e., what (`workflowId`), where (`clusterId`), how (`workflowSpec`), with ([inputs](https://paperspace.gitbook.io/gradient/explore-train-deploy/workflow-spec#inputs), etc.)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://paperspace.gitbook.io/gradient/explore-train-deploy/workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
