-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve clarity in code and docs #1052
Open
DavidMertz
wants to merge
3
commits into
flyteorg:master
Choose a base branch
from
DavidMertz:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,12 @@ In this setup guide, let's run the `examples/basics` project. | |
|
||
```{prompt} bash | ||
git clone https://github.com/flyteorg/flytesnacks | ||
|
||
# or if your SSH key is registered on GitHub: | ||
git clone [email protected]:flyteorg/flytesnacks.git | ||
|
||
# or if you use the `gh` tool: | ||
gh repo clone flyteorg/flytesnacks | ||
cd flytesnacks/examples/basics | ||
pip install -r requirements.txt | ||
``` | ||
|
@@ -67,8 +73,9 @@ pyflyte run basics/hello_world.py my_wf | |
``` | ||
|
||
:::{note} | ||
The first couple arguments of `pyflyte run` is in the form of `path/to/script.py <workflow_name>`, where | ||
`<workflow_name>` is the function decorated with `@workflow` that you want to run. | ||
The first two arguments to `pyflyte run` have the form of | ||
`path/to/script.py <workflow_name>`, where `<workflow_name>` is the function | ||
decorated with `@workflow` that you want to run. | ||
::: | ||
|
||
To run the workflow on the demo Flyte cluster, all you need to do is supply the `--remote` flag: | ||
|
@@ -103,7 +110,11 @@ option as `--arg-name`. | |
|
||
## Visualizing Workflows | ||
|
||
Workflows can be visualized as DAGs on the UI. However, you can visualize workflows on the browser and in the terminal by *just* using your terminal. | ||
Workflows can be visualized as DAGs in the UI. You can also visualize workflows | ||
from your terminal that will be displayed in your default web browser. This | ||
visualization uses the service at graph.flyte.org to render Graphviz diagrams, | ||
and hence shares your DAG (but not your data or code) with an outside party | ||
(security hint 🔐). | ||
|
||
To view workflow on the browser: | ||
|
||
|
@@ -127,15 +138,20 @@ flytectl get workflows \ | |
basics.basic_workflow.my_wf | ||
``` | ||
|
||
Replace `<version>` with version from console UI, it may look something like `BLrGKJaYsW2ME1PaoirK1g==` | ||
Replace `<version>` with the base64-encoded version shown in the console UI, | ||
that looks something like `BLrGKJaYsW2ME1PaoirK1g==`. | ||
|
||
:::{tip} | ||
Running most of the examples in the **User Guide** only requires the default Docker image that ships with Flyte. | ||
Many examples in the {ref}`tutorials` and {ref}`integrations` section depend on additional libraries, `sklearn`, | ||
`pytorch`, or `tensorflow`, which will not work with the default docker image used by `pyflyte run`. | ||
|
||
These examples will explicitly show you which images to use for running these examples by passing in the docker | ||
image you want to use with the `--image` option in `pyflyte run`. | ||
Running most of the examples in the **User Guide** only requires the default | ||
Docker image that ships with Flyte. Many examples in the {ref}`tutorials` and | ||
{ref}`integrations` section depend on additional libraries such as `sklearn`, | ||
`pytorch`, or `tensorflow`, which will not work with the default docker image | ||
used by `pyflyte run`. | ||
|
||
These examples will explicitly show you which images to use for running these | ||
examples by passing in the docker image you want to use with the `--image` | ||
option in `pyflyte run`. | ||
::: | ||
|
||
🎉 Congrats! Now you can run all the examples in the {ref}`userguide` 🎉 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -269,7 +269,7 @@ By default, the `docker_build.sh` script: | |||||
- Uses the `PROJECT_NAME` specified in the `pyflyte init` command, which in | ||||||
this case is `my_project`. | ||||||
- Will not use any remote registry. | ||||||
- Uses the git sha to version your tasks and workflows. | ||||||
- Uses the git revision SHA1 to version your tasks and workflows. | ||||||
``` | ||||||
|
||||||
You can override the default values with the following flags: | ||||||
|
@@ -367,7 +367,7 @@ Let's break down what each flag is doing here: | |||||
- `--archive`: This argument allows you to pass in a package file, which in | ||||||
this case is `flyte-package.tgz`. | ||||||
- `--version`: This is a version string that can be any string, but we recommend | ||||||
using the git sha in general, especially in production use cases. | ||||||
using the git revision in general, especially in production use cases. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
### Using `pyflyte register` versus `pyflyte package` + `flytectl register` | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.