The Banana CLI helps you build Potassium apps
Project description
banana-cli
The goal of the Banana CLI is to bring an npm-like experience to ML development loops.
This version includes:
banana init
to create a project with boilerplatebanana install
to install packages from the requirements.txtbanana dev
to run a dev server with hot-reload
This is a v0 release using SemVer; it is not stable and the interface can break at any time.
To use it
- Install the CLI with pip
pip3 install banana-cli==0.0.11
- Create a new project directory with
banana init my-app
cd my-app
- Start the dev server
banana dev
- Call your API (from a separate terminal)
curl -X POST -H "Content-Type: application/json" -d '{"prompt": "Hello I am a [MASK] model."}' http://localhost:8000/
Hot-Reload Dev Server
The interactive dev server works like a react, next, or nodemon server: it selectively hot reloads components when you save changes to different parts of your app.py
file.
The init() function is ran on startup and for every change to init().
The handler() function is ran on every change to handler(), without needing to wait for a long init()
Play with it:
- Try changing the handler, see what happens!
- Try changing the init, see what happens!
Experimental features:
banana dev --auto-compat=True
to make your GPU code compatible with a CPU machine, by ignoring to("cuda") calls
Future Development:
- Lock in a stable interface
- Add the following commands
banana build
-> verify production buildbanana test
-> unit test against local test casesbanana deploy
-> manually deploy from CLIbanana deploy --canary --ttl=10
-> run a temporary deployment to Banana's cluster for on-GPU testin
- Port to Rust. Why Rust?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
banana_cli-0.0.11.tar.gz
(12.3 kB
view hashes)
Built Distribution
Close
Hashes for banana_cli-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 659b6c4c4b4458c865174aeb788daf40ced48ee9575767bf9eda0b524a8c6f83 |
|
MD5 | 566d8f538c6fa76ec6f81850b2385525 |
|
BLAKE2b-256 | 80a262be6f2f94ff108f38f3afac187a02f72dcdea3dd043ad778e228adde9c0 |