docs: add local (non-pip) modules example for SLS-360 - #47
Open
deanq wants to merge 3 commits into
Open
Conversation
|
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. |
deanq
force-pushed
the
deanquinanola/sls-360-local-modules-example
branch
from
July 24, 2026 19:58
7a16b20 to
f6041cc
Compare
The category and root READMEs listed only 01-04, so the new 05_local_modules example was unreachable from any index. - Add 05_local_modules to the root README example table - Add a full section and learning-path step to the 01_getting_started index - Document the runpod-flash>=1.19.0 requirement; the bundling code is absent before 1.19.0, so every tier fails, not just the live path - Pin the example to runpod-flash>=1.19.0 - Replace the vague "current published image" wording with the concrete stock-worker dates Refs SLS-360
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “local (non-pip) modules” getting-started example demonstrating how Flash endpoints can import and ship sibling modules and local packages (including transitive imports via __init__.py) to workers, aligning with the SLS-360 capability.
Changes:
- Added
01_getting_started/05_local_modules/example with a CPU endpoint that imports a sibling module and a local package. - Expanded top-level and getting-started READMEs to link and describe the new example.
- Pinned Ruff dev dependency to
<0.16to avoid Markdown code block reformatting during format checks.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds the new getting-started example to the main examples list. |
| pyproject.toml | Caps Ruff version in dev dependencies to prevent Markdown reflow. |
| 01_getting_started/README.md | Documents and links the new 05_local_modules example in the learning path. |
| 01_getting_started/05_local_modules/README.md | New walkthrough explaining local-module bundling, build/deploy/live verification tiers, and usage. |
| 01_getting_started/05_local_modules/cpu_worker.py | New CPU endpoint demonstrating in-function imports of local sibling module + local package. |
| 01_getting_started/05_local_modules/text_utils.py | New sibling module used by the endpoint. |
| 01_getting_started/05_local_modules/greetings/init.py | New local package __init__ re-export to exercise transitive import bundling. |
| 01_getting_started/05_local_modules/greetings/messages.py | New package submodule providing greeting templates and render(). |
| 01_getting_started/05_local_modules/pyproject.toml | Defines a per-example project with runpod-flash>=1.19.0 requirement. |
| 01_getting_started/05_local_modules/.gitignore | Ignores per-example build artifacts and local environment files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+30
to
+32
| # Live dev server (see the live-path note below re: worker image) | ||
| flash dev | ||
| # then: curl -s localhost:8888/cpu_worker/runsync -d '{"input": {"name": "Ada", "lang": "es"}}' |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
01_getting_started/05_local_modules/— a CPU example that factors a Flash endpoint across local (non-pip) Python files: a sibling module (text_utils.py) and a package (greetings/, whose__init__re-exports from a submodule). This is the capability delivered by SLS-360.Depends on the SDK/worker change:
What it demonstrates
__init__+ submodule) from an endpoint.flash deploy.Verification (see the example README for commands)
flash buildbundles the sibling + package; a module dropped by the ignore filter (e.g.test_*.py) is force-included when an endpoint imports it; an unresolved endpoint import fails the build loudly.{"greeting": "HOLA, ADA!"}, then torn down.flash dev): works once the worker image from feat: SLS-360 import shipped local modules before executing user code runpod-workers/flash#100 is published (stock workers don't yet materialize inline modules); testable now via a locally-built worker image.Notes
.flash/build artifacts are gitignored.name,lang) so the queue handler'sgreet(**job_input)call binds{"input": {"name": ..., "lang": ...}}correctly.