refactor(contrib): similar namespace [clojure-ui build] (#251)

This commit is contained in:
Aaron Pham
2023-08-23 00:21:59 -04:00
committed by GitHub
parent 79231e652a
commit bbd9aa7646
74 changed files with 42 additions and 40 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1,3 +1,3 @@
* @aarnphm
contrib/clojure @GutZuFusss
openllm-contrib/clojure @GutZuFusss

View File

@@ -52,12 +52,12 @@ release_package() {
pushd openllm-node &>/dev/null
jq --arg release_version "${version}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
popd &>/dev/null
pushd contrib/clojure &>/dev/null
pushd openllm-contrib/clojure &>/dev/null
jq --arg release_version "${version}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
popd &>/dev/null
towncrier build --yes --version "${version}"
cp CHANGELOG.md openllm-python/CHANGELOG.md
git add CHANGELOG.md openllm-python/CHANGELOG.md changelog.d package.json openllm-node/package.json contrib/clojure/package.json
git add CHANGELOG.md openllm-python/CHANGELOG.md changelog.d package.json openllm-node/package.json openllm-contrib/clojure/package.json
git commit -S -sm "infra: prepare for release ${version} [generated] [skip ci]"
git push origin main
echo "Releasing tag ${version}..." && git tag -a "v${version}" -sm "Release ${version} [generated by GitHub Actions]"

View File

@@ -14,7 +14,7 @@ on:
- 'assets/**'
- 'openllm-node/**'
- 'Formula/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
pull_request:
branches: [main]
paths-ignore:
@@ -26,7 +26,7 @@ on:
- 'assets/**'
- 'openllm-node/**'
- 'Formula/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}

View File

@@ -1,5 +1,6 @@
name: Continuous Integration
on:
workflow_call:
push:
branches: [main]
paths-ignore:
@@ -9,7 +10,7 @@ on:
- '*.md'
- 'changelog.d/**'
- 'assets/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
pull_request:
branches: [main]
paths-ignore:
@@ -19,7 +20,7 @@ on:
- '*.md'
- 'changelog.d/**'
- 'assets/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
env:
LINES: 120
COLUMNS: 120
@@ -46,6 +47,7 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # ratchet:actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: bentoml/setup-bentoml-action@59beefe94e2e8f8ebbedf555fc86bd5d1ae0a708 # ratchet:bentoml/setup-bentoml-action@v1
with:
bentoml-version: 'main'
@@ -63,12 +65,12 @@ jobs:
name: report-coverage
runs-on: ubuntu-latest
if: false
needs:
- tests
needs: tests
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # ratchet:actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: bentoml/setup-bentoml-action@59beefe94e2e8f8ebbedf555fc86bd5d1ae0a708 # ratchet:bentoml/setup-bentoml-action@v1
with:
bentoml-version: 'main'

View File

@@ -102,8 +102,8 @@ jobs:
id: build-and-push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # ratchet:docker/build-push-action@v4
with:
context: contrib/clojure
file: contrib/clojure/Dockerfile
context: openllm-contrib/clojure
file: openllm-contrib/clojure/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |

View File

@@ -24,7 +24,7 @@ on:
- '*.md'
- 'changelog.d/**'
- 'assets/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
pull_request:
branches: [main]
paths-ignore:
@@ -34,7 +34,7 @@ on:
- '*.md'
- 'changelog.d/**'
- 'assets/**'
- 'contrib/clojure/**'
- 'openllm-contrib/clojure/**'
env:
LINES: 120
COLUMNS: 120

View File

@@ -169,10 +169,10 @@ jobs:
pushd openllm-node &>/dev/null
jq --arg release_version "${DEV_VERSION}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
popd &>/dev/null
pushd contrib/clojure &>/dev/null
pushd openllm-contrib/clojure &>/dev/null
jq --arg release_version "${version}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
popd &>/dev/null
git add package.json openllm-node/package.json contrib/clojure/package.json && git commit -S -sm "infra: bump to dev version of ${DEV_VERSION} [generated] [skip ci]"
git add package.json openllm-node/package.json openllm-contrib/clojure/package.json && git commit -S -sm "infra: bump to dev version of ${DEV_VERSION} [generated] [skip ci]"
git push origin HEAD:main
binary-distribution:
if: github.repository_owner == 'bentoml'

View File

@@ -17,6 +17,9 @@ concurrency:
group: cron-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
scheduled-tests:
if: github.repository_owner == 'bentoml'
uses: bentoml/OpenLLM/.github/workflows/ci.yml@main # ratchet:exclude
update-actions:
runs-on: 'ubuntu-latest'
name: Ratchet update

View File

@@ -39,7 +39,7 @@ This changelog is managed by towncrier and is compiled at release time.
- OpenLLM now include a community-maintained ClojureScript UI, Thanks @GutZuFusss
See [this README.md](/contrib/clojure/README.md) for more information
See [this README.md](/openllm-contrib/clojure/README.md) for more information
OpenLLM will also include a `--cors` to enable start with cors enabled.
[#89](https://github.com/bentoml/openllm/issues/89)

View File

@@ -196,7 +196,7 @@ See this [docs](/.github/INFRA.md) for more information on OpenLLM's CI/CD workf
## UI
See [ClojureScript UI's README.md](/contrib/clojure/README.md) for more information.
See [ClojureScript UI's README.md](/openllm-contrib/clojure/README.md) for more information.
## Install from git archive install

View File

@@ -4,4 +4,4 @@ Added a separate section for all extension with the CLI. `openllm playground` is
introduce compiled wheels gradually
added a easy `loc.py` for LOC tracking
added a easy `cz.py` for code golf and LOC

View File

@@ -1,9 +1,10 @@
OpenLLM now provides SSE support
> [!NOTE]
> For this to work, you must install BentoML from HEAD:
> `pip install 'git+https://github.com/bentoml/BentoML.git@main'`
> For this to work, you must install BentoML>=1.1.2:
> `pip install -U bentoml>=1.1.2`
The endpoint can be accessed via `/v1/generate_stream`
Curl in fact does support SSE (by passing in `-N`)
> [!NOTE]
> Curl does in fact does support SSE by passing in `-N`

View File

@@ -1,5 +1,5 @@
OpenLLM now comprise of three packages:
- openllm-core: main building blocks of OpenLLM, that doesn't depend on transformers and heavy DL libraries
- openllm-client: The implementation of `openllm.client`
- openllm: = openllm-core + openllm-client + DL features
- `openllm-core`: main building blocks of OpenLLM, that doesn't depend on transformers and heavy DL libraries
- `openllm-client`: The implementation of `openllm.client`
- `openllm`: = `openllm-core` + `openllm-client` + DL features (under `openllm-python`)

View File

@@ -93,7 +93,7 @@ write-summary-report = "python tools/write-coverage-report.py"
detached = true
[envs.ui.scripts]
server = "openllm start {args:flan-t5} --working-dir {root:uri} --cors --debug"
clojure = ["bash tools/run-clojure-ui.sh"]
clojure = ["bash openllm-contrib/clojure/run-clojure-ui.sh"]
[envs.ci]
detached = true
[envs.ci.scripts]
@@ -102,5 +102,5 @@ recompile = ["bash ./clean.sh", "compile"]
edi = "bash local.sh"
lock = [
"bash tools/lock-actions.sh",
"pushd contrib/clojure && pnpm i --frozen-lockfile",
"pushd openllm-contrib/clojure && pnpm i --frozen-lockfile",
]

View File

@@ -1,5 +1,5 @@
<div align="center">
<h1 align="center">OpenLLM ClojureScript UI</h1>
<h1 align="center">🧭 OpenLLM ClojureScript UI</h1>
<p>Built using <a href="http://reagent-project.github.io/">reagent</a>, <a href="https://github.com/day8/re-frame">reframe</a>, <a href="https://tailwindcss.com/">Tailwind CSS</a>, and <a href="https://shadow-cljs.github.io/docs/UsersGuide.html">shadow-cljs</a></br></p>
<i></i>
</div>

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -2,9 +2,9 @@
set -ex -o pipefail
GIT_ROOT=$(git rev-parse --show-toplevel)
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
cd "$GIT_ROOT" || exit 1
cd "$SCRIPT_DIR" || exit 1
if ! command -v node @ >&1 > /dev/null; then
echo "Cannot find 'node' executable in PATH. Make sure to have Node.js setup. Refer to"
@@ -23,8 +23,4 @@ if ! command -v hatch @ >&1 > /dev/null; then
exit 1
fi
pushd contrib/clojure > /dev/null
pnpm install
popd > /dev/null
pnpm run -C "$GIT_ROOT"/contrib/clojure dev
pnpm i && pnpm run dev

View File

@@ -39,7 +39,7 @@ This changelog is managed by towncrier and is compiled at release time.
- OpenLLM now include a community-maintained ClojureScript UI, Thanks @GutZuFusss
See [this README.md](/contrib/clojure/README.md) for more information
See [this README.md](/openllm-contrib/clojure/README.md) for more information
OpenLLM will also include a `--cors` to enable start with cors enabled.
[#89](https://github.com/bentoml/openllm/issues/89)

View File

@@ -543,10 +543,10 @@ client.embed("I like to eat apples")
The following UIs are currently available for OpenLLM:
| UI | Owner | Type | Progress |
|-----------------------------------------------------------------------------------|-----------------------------------------------|----------------------|----------|
| [Clojure](https://github.com/bentoml/OpenLLM/blob/main/contrib/clojure/README.md) | [@GutZuFusss](https://github.com/GutZuFusss) | Community-maintained | 🔧 |
| TS | BentoML Team | | 🚧 |
| UI | Owner | Type | Progress |
|-------------------------------------------------------------------------------------------|----------------------------------------------|----------------------|----------|
| [Clojure](https://github.com/bentoml/OpenLLM/blob/main/openllm-contrib/clojure/README.md) | [@GutZuFusss](https://github.com/GutZuFusss) | Community-maintained | 🔧 |
| TS | BentoML Team | | 🚧 |
## ⚙️ Integrations

View File

@@ -10,7 +10,7 @@
},
"workspaces": [
"openllm-node",
"contrib/clojure"
"openllm-contrib/clojure"
],
"private": true,
"devDependencies": {