Skip to content

Commit d4ce939

Browse files
authored
misc(client-baseten): docs, readme update. (#1672)
* add batch post requests * add batch post requests * more docs * httperror * add baseten embeddings * add baseten embeddings * v024 revert * ci and bindings * bump
1 parent 4c4e282 commit d4ce939

File tree

6 files changed

+252
-244
lines changed

6 files changed

+252
-244
lines changed
Lines changed: 14 additions & 226 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# This file is autogenerated by maturin v1.8.1
2-
# To update, run
3-
#
4-
# maturin generate-ci github
5-
#
6-
name: truss-transfer-build-maturin
1+
name: Build and Release truss-transfer
72

83
on:
94
push:
@@ -13,229 +8,22 @@ on:
138
paths:
149
- "truss-transfer/**"
1510
tags:
16-
- "*" # Still runs on all tags regardless of directory changes
11+
- "*"
1712
pull_request:
1813
paths:
1914
- "truss-transfer/**"
2015
workflow_dispatch:
21-
22-
permissions:
23-
contents: read
16+
inputs:
17+
publish_pypi:
18+
description: "Publish to PyPI? (true/false)"
19+
required: false
20+
default: "false"
2421

2522
jobs:
26-
linux:
27-
runs-on: ${{ matrix.platform.runner }}
28-
strategy:
29-
matrix:
30-
platform:
31-
- runner: ubuntu-22.04
32-
target: x86_64
33-
- runner: ubuntu-22.04
34-
target: x86
35-
- runner: ubuntu-22.04
36-
target: aarch64
37-
- runner: ubuntu-22.04
38-
target: armv7
39-
# - runner: ubuntu-22.04
40-
# target: s390x
41-
- runner: ubuntu-22.04
42-
target: ppc64le
43-
steps:
44-
- uses: actions/checkout@v4
45-
- uses: actions/setup-python@v5
46-
with:
47-
python-version: 3.x
48-
- name: Build wheels
49-
uses: PyO3/maturin-action@v1
50-
with:
51-
working-directory: truss-transfer
52-
target: ${{ matrix.platform.target }}
53-
args: --release --out dist --find-interpreter
54-
sccache: "false"
55-
manylinux: auto
56-
before-script-linux: |
57-
if command -v apt-get &> /dev/null; then
58-
apt-get update && apt-get install libssl-dev libatomic-ops-dev -y
59-
elif command -v yum &> /dev/null; then
60-
yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y
61-
else
62-
echo "Neither apt-get nor yum is installed. Please install a package manager."
63-
exit 1
64-
fi
65-
- name: Build free-threaded wheels
66-
uses: PyO3/maturin-action@v1
67-
if: ${{ matrix.platform.target != 'aarch64' || matrix.platform.target != 'armv7' }}
68-
with:
69-
working-directory: truss-transfer
70-
target: ${{ matrix.platform.target }}
71-
args: --release --out dist -i python3.13t
72-
sccache: "false"
73-
manylinux: auto
74-
docker-options: >
75-
${{ matrix.platform.target == 'armv7' && '--env RING_PREGENERATE_ASM=false' || '' }}
76-
before-script-linux: |
77-
if command -v apt-get &> /dev/null; then
78-
apt-get update && apt-get install libssl-dev libatomic-ops-dev -y
79-
elif command -v yum &> /dev/null; then
80-
yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y
81-
else
82-
echo "Neither apt-get nor yum is installed. Please install a package manager."
83-
exit 1
84-
fi
85-
- name: Upload wheels
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: wheels-linux-${{ matrix.platform.target }}
89-
path: truss-transfer/dist
90-
91-
musllinux:
92-
runs-on: ${{ matrix.platform.runner }}
93-
strategy:
94-
matrix:
95-
platform:
96-
- runner: ubuntu-22.04
97-
target: x86_64
98-
- runner: ubuntu-22.04
99-
target: x86
100-
- runner: ubuntu-22.04
101-
target: aarch64
102-
- runner: ubuntu-22.04
103-
target: armv7
104-
steps:
105-
- uses: actions/checkout@v4
106-
- uses: actions/setup-python@v5
107-
with:
108-
python-version: 3.x
109-
- name: Build wheels
110-
uses: PyO3/maturin-action@v1
111-
with:
112-
working-directory: truss-transfer
113-
target: ${{ matrix.platform.target }}
114-
args: --release --out dist --find-interpreter
115-
sccache: "false"
116-
manylinux: musllinux_1_2
117-
- name: Build free-threaded wheels
118-
uses: PyO3/maturin-action@v1
119-
with:
120-
working-directory: truss-transfer
121-
target: ${{ matrix.platform.target }}
122-
args: --release --out dist -i python3.13t
123-
sccache: "false"
124-
manylinux: musllinux_1_2
125-
- name: Upload wheels
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: wheels-musllinux-${{ matrix.platform.target }}
129-
path: truss-transfer/dist
130-
131-
windows:
132-
runs-on: ${{ matrix.platform.runner }}
133-
strategy:
134-
matrix:
135-
platform:
136-
- runner: windows-latest
137-
target: x64
138-
- runner: windows-latest
139-
target: x86
140-
steps:
141-
- uses: actions/checkout@v4
142-
- uses: actions/setup-python@v5
143-
with:
144-
python-version: 3.x
145-
architecture: ${{ matrix.platform.target }}
146-
- name: Build wheels
147-
uses: PyO3/maturin-action@v1
148-
with:
149-
working-directory: truss-transfer
150-
target: ${{ matrix.platform.target }}
151-
args: --release --out dist --find-interpreter
152-
sccache: "false"
153-
# - name: Build free-threaded wheels
154-
# uses: PyO3/maturin-action@v1
155-
# with:
156-
# target: ${{ matrix.platform.target }}
157-
# args: --release --out dist -i python3.13t
158-
# sccache: 'false'
159-
# working-directory: truss-transfer
160-
- name: Upload wheels
161-
uses: actions/upload-artifact@v4
162-
with:
163-
name: wheels-windows-${{ matrix.platform.target }}
164-
path: truss-transfer/dist
165-
166-
macos:
167-
runs-on: ${{ matrix.platform.runner }}
168-
strategy:
169-
matrix:
170-
platform:
171-
- runner: macos-13
172-
target: x86_64
173-
- runner: macos-14
174-
target: aarch64
175-
steps:
176-
- uses: actions/checkout@v4
177-
- uses: actions/setup-python@v5
178-
with:
179-
python-version: 3.x
180-
- name: Build wheels
181-
uses: PyO3/maturin-action@v1
182-
with:
183-
working-directory: truss-transfer
184-
target: ${{ matrix.platform.target }}
185-
args: --release --out dist --find-interpreter
186-
sccache: "false"
187-
- name: Build free-threaded wheels
188-
uses: PyO3/maturin-action@v1
189-
with:
190-
working-directory: truss-transfer
191-
target: ${{ matrix.platform.target }}
192-
args: --release --out dist -i python3.13t
193-
sccache: "false"
194-
- name: Upload wheels
195-
uses: actions/upload-artifact@v4
196-
with:
197-
name: wheels-macos-${{ matrix.platform.target }}
198-
path: truss-transfer/dist
199-
200-
sdist:
201-
runs-on: ubuntu-latest
202-
steps:
203-
- uses: actions/checkout@v4
204-
- name: Build sdist
205-
uses: PyO3/maturin-action@v1
206-
with:
207-
working-directory: truss-transfer
208-
command: sdist
209-
args: --out dist
210-
- name: Upload sdist
211-
uses: actions/upload-artifact@v4
212-
with:
213-
name: wheels-sdist
214-
path: truss-transfer/dist
215-
216-
release:
217-
name: Release
218-
runs-on: ubuntu-latest
219-
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
220-
needs: [linux, musllinux, windows, macos, sdist]
221-
permissions:
222-
# Use to sign the release artifacts
223-
id-token: write
224-
# Used to upload release artifacts
225-
contents: write
226-
# Used to generate artifact attestation
227-
attestations: write
228-
steps:
229-
- uses: actions/download-artifact@v4
230-
- name: Generate artifact attestation
231-
uses: actions/attest-build-provenance@v1
232-
with:
233-
subject-path: "wheels-*/*"
234-
- name: Publish to PyPI
235-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
236-
uses: PyO3/maturin-action@v1
237-
env:
238-
MATURIN_PYPI_TOKEN: ${{ secrets.TRUSS_TRANSFER_PYPI_API_TOKEN }}
239-
with:
240-
command: upload
241-
args: --non-interactive --skip-existing wheels-*/*
23+
build-package:
24+
uses: ./.github/workflows/build-maturin.yml
25+
with:
26+
folder: truss-transfer
27+
publish_pypi: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_pypi == 'true' || startsWith(github.ref, 'refs/tags/') }}
28+
secrets:
29+
PYPI_TOKEN: ${{ secrets.TRUSS_TRANSFER_PYPI_API_TOKEN }}

baseten-inference-client/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

baseten-inference-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "baseten_inference_client"
3-
version = "0.0.1-rc1"
3+
version = "0.0.1-rc2"
44
edition = "2021"
55

66
[dependencies]

0 commit comments

Comments
 (0)