Skip to content

Commit 340749c

Browse files
ppiegazedocsyclaude
committed
docs: the first file you write is temperatures.py, not a copy of the built-in
Peeter's call: the built-in `hello` is the see-it-work step, and the reader's first real file should be a different program with a different name. Until now the quickstart's hello.py was the same program as the SDK's built-in with different identifiers, so a reader retyped what `flyte run --local hello` had just written to a scratch directory, and `hello` next to `hello.py main` on one page invited confusion. temperatures.py (unionai-examples#310) converts a list of readings with flyte.map and returns the hottest: same lessons, unmistakably different code, names and output. The output block is real output from running it, o0=75.7. Also: the run-it warning said "when running remotely", the phrasing DOC-1326 retired. Now "when running on a cluster". Depends on unionai-examples#310 merging and the examples submodule pointer being bumped in its own PR; the {{< code >}} include cannot resolve on CI until then, so this goes back to draft. Co-Authored-By: docsy <docsy@union.ai> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017CJ89R9ri86y11FFhPdVJV Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
1 parent 16e2f5b commit 340749c

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

content/user-guide/get-started/quickstart.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Copy it into your own project to start editing.
7070
Completed Local Run Outputs: ActionOutputs(o0=14.0)
7171
```
7272

73-
The example fans a small computation over a list of inputs with `flyte.map` and averages the results. Copy that file into a project of your own when you want to start editing, or carry on below to write one from scratch.
73+
The example fans a small computation over a list of inputs with `flyte.map` and averages the results. That is enough to see a workflow run. Next, write one of your own.
7474

7575
{{< variant union >}}
7676
{{< markdown >}}
@@ -122,14 +122,15 @@ Run `flyte get config` to check which configuration is currently active.
122122
> apps, and tests for you, plus MCP servers that ground the agent in the Flyte SDK
123123
> and docs. See [Flyte agent plugins](../../api-reference/agent-plugins) to get started.
124124
125-
Create `hello.py`:
125+
This one converts a list of temperature readings and returns the hottest. Create `temperatures.py`:
126126
127-
{{< code file="/unionai-examples/v2/user-guide/getting-started/hello.py" lang="python" >}}
127+
{{< code file="/unionai-examples/v2/user-guide/getting-started/temperatures.py" lang="python" >}}
128128
129129
Here's what's happening:
130130
131131
- **`TaskEnvironment`** specifies configuration for your tasks (container image, resources, etc.)
132132
- **`@env.task`** turns Python functions into tasks that can run on a cluster
133+
- **`flyte.map`** calls `to_fahrenheit` once per reading, in parallel when running on a cluster
133134
- Both tasks share the same `env`, so they'll have identical configurations
134135
135136
## Run it
@@ -138,21 +139,26 @@ Create a project directory and place your files there:
138139
139140
```
140141
.
141-
├── hello.py
142+
├── temperatures.py
142143
└── .flyte
143144
└── config.yaml
144145
```
145146
146147
> [!WARNING]
147-
> Do not run `flyte run` from your home directory. Flyte packages the current directory when running remotely, so running from `$HOME` would attempt to bundle your entire home folder. Always work from a dedicated project directory.
148+
> Do not run `flyte run` from your home directory. Flyte packages the current directory when running on a cluster, so running from `$HOME` would attempt to bundle your entire home folder. Always work from a dedicated project directory.
148149
149-
Run the workflow:
150+
Run the workflow, naming the file and the entrypoint task:
150151
151152
```bash
152-
flyte run --local hello.py main
153+
flyte run --local temperatures.py hottest
153154
```
154155
155-
This executes the workflow locally on your machine.
156+
This executes the workflow locally on your machine:
157+
158+
```bash
159+
Completed Local Run
160+
Outputs: ActionOutputs(o0=75.7)
161+
```
156162
157163
## See the results
158164

0 commit comments

Comments
 (0)