Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ If the model requires authentication:
The default value for `hf_token_key` is `HF_TOKEN`, where `HF_TOKEN` is the name of the Flyte secret containing your
HuggingFace token. If this secret doesn't exist, you can create a secret using the [flyte create secret CLI](../../tasks/task-configuration/secrets).

Public models need no token at all. Pass `hf_token_key=None` to prefetch anonymously, and no secret is attached to the prefetch task.

### With resources

By default, the prefetch task uses minimal resources (2 CPUs, 8GB of memory, 50Gi of disk storage), using
Expand Down
25 changes: 25 additions & 0 deletions content/user-guide/get-started/run-modes/running-devbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,31 @@ This pulls the necessary containers and starts a local Flyte instance. Once read
The first start may take a few minutes while Docker images are downloaded.
{{< /note >}}

## Check the devbox status

> [!NOTE]
> `flyte get devbox` requires flyte 2.6.2 or later.
Comment on lines +89 to +90

To see whether the devbox is up, and where it is:

```bash
flyte get devbox
```

This reports the run state, the UI and image registry endpoints, the container image version in use, and where the cluster keeps its state on disk. It is the quickest way to tell a devbox that is still starting from one that is ready.

Add `--no-probes` to skip the readiness probe and the container resource sample, which makes the check faster and works offline:

```bash
flyte get devbox --no-probes
```

For a machine-readable report, pass an output format to the top-level command:

```bash
flyte -of json-raw get devbox
```

## Configure

Create a config file that points to the devbox:
Expand Down
43 changes: 43 additions & 0 deletions content/user-guide/tasks/task-programming/reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,46 @@ if __name__ == "__main__":
> The report contains only what you explicitly `log()` or `replace()`. Returning a value whose type has a renderer attached does **not** by itself add it to the report — render the value and log the HTML, as shown above.

Flyte's SDK also implements a few renderers of this kind internally — for pandas and PyArrow DataFrames and for Markdown strings. These aren't exposed as public API (only the `flyte.types.Renderable` protocol is), so treat them as examples of the same pattern rather than importable helpers.

## Fetching a report after the run

Everything above is about *writing* a report from inside a task. To *read* a finished report from outside the run, for example to embed it in a notebook or attach it to a CI job, fetch it through the remote API:

```python
import flyte
from flyte.remote import Run

flyte.init_from_config()

run = Run.get("my-run-name")
html = run.get_report()
```

`get_report()` returns the report as an HTML string. It requests a signed download link for the report artifact and downloads the contents, so the call needs an initialized client.

By default it returns the report for the latest attempt. Pass `attempt` to fetch an earlier one:

```python
html = run.get_report(attempt=1)
```

`Run.get_report()` returns the report of the run's **root action**. A run whose tasks call other tasks has a report per action, so to fetch the report for a nested action, use `flyte.remote.Action.get_report()` on that action instead:

```python
from flyte.remote import Action

action = Action.get(run_name="my-run-name", name="6n505tdw46zu7fpmgtui1r1uw")
html = action.get_report()
```

Nested actions are named deterministically from the parent action, the task identity, the inputs and the call sequence, so the name is a generated string rather than the task's function name. List the actions in a run to find the one you want:

```bash
flyte get action my-run-name
```

Both are synchronous by default. From async code, call the `.aio` variant:

```python
html = await run.get_report.aio()
```
Loading