docs: remove duplicate info froms README, remove flash run from instructions#43
docs: remove duplicate info froms README, remove flash run from instructions#43muhsinking wants to merge 4 commits into
Conversation
KAJdev
left a comment
There was a problem hiding this comment.
Okay, I got halfway through using individual comments, but the underlying theme is that there's a mismatch of python script.py and uv run script.py. We should prefer uv run in all cases.
That's the main thing I found. everything else looks okay.
Address review feedback on #43 (python script.py vs uv run mismatch): - Worker scripts now use `uv run <script>.py` (was `python <script>.py`) across all example READMEs and worker file header comments. - Local dev server uses `flash dev` (the public CLI command; `flash run` is a hidden deprecated alias). CLI commands kept bare; add `uv tool install runpod-flash` to setup steps so the CLI is on PATH.
|
Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
|
Addressed the
Happy to flip the CLI commands to |
There was a problem hiding this comment.
Pull request overview
Updates the Flash examples documentation to reduce duplicated conceptual content and shift the “getting started” flow toward running individual worker scripts directly, while moving the “What is Flash?” section after setup steps.
Changes:
- Removed duplicate conceptual/CLI sections from the root README and reorganized “What is Flash?” below Quick Start.
- Updated multiple example READMEs to run workers via
uv run <worker>.pyand adjusted local HTTP testing instructions. - Refreshed top-of-file comments in example workers/pipeline to match the new recommended dev/test flow.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Removes duplicated conceptual content; updates Quick Start and prerequisites; reintroduces “What is Flash?” later. |
| 06_real_world/README.md | Updates development pattern docs to run workers directly and run a full HTTP app locally. |
| 05_data_workflows/01_network_volumes/README.md | Updates quick start to run GPU worker directly; adjusts CPU HTTP testing instructions. |
| 05_data_workflows/01_network_volumes/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 05_data_workflows/01_network_volumes/cpu_worker.py | Updates header comments clarifying HTTP-route testing workflow. |
| 04_scaling_performance/01_autoscaling/README.md | Switches to running workers directly; updates load-test invocation to uv run. |
| 04_scaling_performance/01_autoscaling/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 04_scaling_performance/01_autoscaling/cpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 03_advanced_workers/05_load_balancer/README.md | Reworks quick start to test workers directly and separately run HTTP routes locally. |
| 03_advanced_workers/05_load_balancer/gpu_lb.py | Updates header comments to match new worker-vs-HTTP testing guidance. |
| 03_advanced_workers/05_load_balancer/cpu_lb.py | Updates header comments to match new worker-vs-HTTP testing guidance. |
| 02_ml_inference/01_text_to_speech/README.md | Switches to running the worker directly; keeps an option for HTTP API testing. |
| 02_ml_inference/01_text_to_speech/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/04_dependencies/README.md | Updates run instructions to execute workers directly; adds optional HTTP API testing. |
| 01_getting_started/04_dependencies/mixed_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/04_dependencies/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/04_dependencies/cpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/03_mixed_workers/README.md | Updates workflow to test workers directly and separately run the full HTTP pipeline. |
| 01_getting_started/03_mixed_workers/pipeline.py | Adds a sys.path tweak for sibling imports; updates header comments and keeps local test harness. |
| 01_getting_started/03_mixed_workers/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/03_mixed_workers/cpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/02_cpu_worker/README.md | Switches to running the worker directly; retains optional HTTP API testing guidance. |
| 01_getting_started/02_cpu_worker/cpu_worker.py | Updates header comments to match the new run/testing guidance. |
| 01_getting_started/01_hello_world/README.md | Switches to running the worker directly; retains optional HTTP API testing guidance. |
| 01_getting_started/01_hello_world/gpu_worker.py | Updates header comments to match the new run/testing guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Key features:** | ||
| - **`@Endpoint` decorator**: Mark any async function to run on serverless infrastructure | ||
| - **Auto-scaling**: Scale to zero when idle, scale up under load | ||
| - **Local development**: `flash dev` starts a local server with hot reload |
|
|
||
| Or run the full app with HTTP routes: | ||
| ```bash | ||
| flash dev |
| curl -X POST http://localhost:8888/gpu_worker/runsync \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"prompt": "a sunset over mountains"}' | ||
| flash dev |
| curl -X POST http://localhost:8888/gpu_worker/runsync \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"matrix_size": 512}' | ||
| flash dev |
| uv run load_test.py --endpoint /cpu_worker/runsync --requests 100 --concurrency 50 | ||
| ``` | ||
|
|
||
| **Requires:** `pip install aiohttp` |
| The pipeline endpoint (`/classify`) orchestrates multiple workers via HTTP. To test it: | ||
|
|
||
| ```bash | ||
| flash dev |
|
|
||
| Visit **http://localhost:8888/docs** for interactive API documentation. QB endpoints are auto-generated by `flash run` based on your `@Endpoint` functions. | ||
| ```bash | ||
| flash dev |
| ### HTTP API Testing (Optional) | ||
| ```bash | ||
| flash run | ||
| flash dev |
|
|
||
| Visit **http://localhost:8888/docs** for interactive API documentation. QB endpoints are auto-generated by `flash run` based on your `@Endpoint` functions. | ||
| ```bash | ||
| flash dev |
| ### HTTP API Testing (Optional) | ||
| ```bash | ||
| flash run | ||
| flash dev |
|
Closing this as superseded by what has since landed on main:
Rebasing |
Users in the UX study reported that it was unnecessary/confusing to have the conceptual information repeated in the flash examples readme.
Also restructured it to put "what is flash" after the getting started steps.