Skip to content

Commit

Permalink
[Doc] Add doc for pfazure run download (#1632)
Browse files Browse the repository at this point in the history
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
0mza987 authored Jan 2, 2024
1 parent 5b93bbd commit b504bef
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/reference/pf-command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ pf run create [--file]
[--environment-variables]
[--connections]
[--set]
[--source]
```

#### Examples
Expand All @@ -475,6 +476,12 @@ Create a run from flow directory and reference a run.
pf run create --flow <path-to-flow-directory> --data <path-to-data-file> --column-mapping groundtruth='${data.answer}' prediction='${run.outputs.category}' --run <run-name> --variant '${summarize_text_content.variant_0}' --stream
```

Create a run from an existing run record folder.

```bash
pf run create --source <path-to-run-folder>
```

#### Optional Parameters

`--file -f`
Expand Down Expand Up @@ -523,6 +530,10 @@ Example: `--connections node1.connection=test_llm_connection node1.deployment_na
Update an object by specifying a property path and value to set.
Example: `--set property1.property2=<value>`.

`--source`

Local path to the existing run record folder.

### pf run update

Update a run metadata, including display name, description and tags.
Expand Down
49 changes: 48 additions & 1 deletion docs/reference/pfazure-command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Local path to the flow directory.
`--set`

Update an object by specifying a property path and value to set.
- `display-name`: Flow display name that will be created in remote. Default to be flow folder name + timestamp if not specified.
- `display_name`: Flow display name that will be created in remote. Default to be flow folder name + timestamp if not specified.
- `type`: Flow type. Default to be "standard" if not specified. Available types are: "standard", "evaluation", "chat".
- `description`: Flow description. e.g. "--set description=\<description\>."
- `tags`: Flow tags. e.g. "--set tags.key1=value1 tags.key2=value2."
Expand Down Expand Up @@ -133,6 +133,7 @@ Manage prompt flow runs.
| [pfazure run archive](#pfazure-run-archive) | Archive a run. |
| [pfazure run restore](#pfazure-run-restore) | Restore a run. |
| [pfazure run update](#pfazure-run-update) | Update a run. |
| [pfazure run download](#pfazure-run-download) | Download a run. |

### pfazure run create

Expand Down Expand Up @@ -504,3 +505,49 @@ Resource group name, required when there is no default value from `az configure`

Workspace name, required when there is no default value from `az configure`.


### pfazure run download

Download a run's metadata, such as `input`, `output`, `snapshot` and `artifact`. After the download is finished, you can use `pf run create --source <run-info-local-folder>` to register this run as a local run record, then you can use commands like `pf run show/visualize` to inspect the run just like a run that was created from local flow.

```bash
pfazure run download --name
[--output]
[--overwrite]
[--subscription]
[--resource-group]
[--workspace-name]
```

#### Examples

Download a run data to local:
```bash
pfazure run download --name <name> --output <output-folder-path>
```

#### Parameters

`--name -n`

Name of the run.

`--output -o`

Output folder path to store the downloaded run data. Default to be `~/.promptflow/.runs` if not specified

`--overwrite`

Overwrite the existing run data if the output folder already exists. Default to be `False` if not specified

`--subscription`

Subscription id, required when there is no default value from `az configure`.

`--resource-group -g`

Resource group name, required when there is no default value from `az configure`.

`--workspace-name -w`

Workspace name, required when there is no default value from `az configure`.

0 comments on commit b504bef

Please sign in to comment.