Skip to content

Commit a9d0755

Browse files
authored
Merge branch 'main' into feat/storybook-ci-tests
2 parents 41501a0 + 9b85ddb commit a9d0755

File tree

75 files changed

+2279
-1127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2279
-1127
lines changed

.github/workflows/caching-hack.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ jobs:
5454
shared-key: "build-gateway-cache"
5555
- name: Install uv
5656
if: runner.os == 'windows'
57-
run: |
58-
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
57+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
58+
with:
59+
version: "0.6.17"
5960
- name: Install Python 3.10
6061
if: runner.os == 'windows'
6162
run: |

.github/workflows/general.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ jobs:
281281
shell: bash
282282

283283
- name: Install uv
284-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
284+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
285+
with:
286+
version: "0.6.17"
285287

286288
- name: Generate Python schemas
287289
run: pnpm generate-python-schemas
@@ -317,7 +319,9 @@ jobs:
317319
cache-provider: "buildjet"
318320
save-if: ${{ github.event_name == 'merge_group' }}
319321
- name: Install uv
320-
run: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
322+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
323+
with:
324+
version: "0.6.17"
321325
- name: Install Python 3.10
322326
run: uv python install 3.10
323327
- name: Set PYO3_PYTHON
@@ -384,7 +388,9 @@ jobs:
384388
run: rustc --version
385389

386390
- name: Install uv
387-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
391+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
392+
with:
393+
version: "0.6.17"
388394

389395
- name: uv-lock
390396
run: |
@@ -628,7 +634,9 @@ jobs:
628634
shell: bash
629635

630636
- name: Install uv
631-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
637+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
638+
with:
639+
version: "0.6.17"
632640

633641
- name: Install JS dependencies
634642
run: pnpm install --frozen-lockfile
@@ -780,7 +788,9 @@ jobs:
780788
./ui/fixtures/s3-fixtures/
781789
782790
- name: Install uv
783-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
791+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
792+
with:
793+
version: "0.6.17"
784794

785795
- name: Download container images
786796
run: |
@@ -969,7 +979,11 @@ jobs:
969979
tool: cargo-nextest
970980

971981
- name: Install uv
972-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
982+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
983+
with:
984+
version: "0.6.17"
985+
# Without this, the post-install hook tries to prune and save the cache, but ./ci/free-disk-space.sh already nukes /opt/hostedtoolcache/*, so it fails.
986+
enable-cache: "false"
973987

974988
- name: Download ClickHouse fixtures
975989
run: uv run ./ui/fixtures/download-fixtures.py

.github/workflows/merge-queue.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ jobs:
221221
run: rustc --version
222222

223223
- name: Install uv
224-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
224+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
225+
with:
226+
version: "0.6.17"
225227

226228
- name: Install pnpm
227229
run: |

.github/workflows/python-client-build.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
python-version: "3.10"
2929

3030
- name: Install uv
31-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
31+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
32+
with:
33+
version: "0.6.17"
3234

3335
- name: Install Rust toolchain
3436
run: |
@@ -96,7 +98,9 @@ jobs:
9698
with:
9799
python-version: "3.10"
98100
- name: Install uv
99-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
101+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
102+
with:
103+
version: "0.6.17"
100104
- name: Build wheels
101105
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
102106
with:
@@ -145,8 +149,9 @@ jobs:
145149
python-version: "3.10"
146150
architecture: ${{ matrix.platform.target }}
147151
- name: Install uv
148-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
149-
shell: bash
152+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
153+
with:
154+
version: "0.6.17"
150155
- name: Build wheels
151156
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
152157
with:
@@ -199,7 +204,9 @@ jobs:
199204
python-version: "3.10"
200205

201206
- name: Install uv
202-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
207+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
208+
with:
209+
version: "0.6.17"
203210

204211
- name: Build wheels
205212
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
@@ -235,7 +242,9 @@ jobs:
235242
name: wheels-sdist
236243
path: ./clients/python/dist
237244
- name: Install uv
238-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
245+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
246+
with:
247+
version: "0.6.17"
239248
- name: Check local sdist
240249
run: |
241250
./ci/check-local-wheel.sh ./clients/python/dist/tensorzero-*.tar.gz

.github/workflows/tensorzero-ci-bot-failure-diagnosis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
uses: pnpm/action-setup@v4
4141

4242
- name: Install uv
43-
uses: astral-sh/setup-uv@v7
43+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
44+
with:
45+
version: "0.6.17"
4446

4547
- name: Install mini-swe-agent
4648
run: 'uv tool install mini-swe-agent --from "git+https://github.com/virajmehta/mini-swe-agent.git@main"'

.github/workflows/upgrade-tensorzero-deps.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
token: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- name: Install uv
31-
run: curl -LsSf --retry 2 --retry-delay 10 --retry-max-time 60 https://astral.sh/uv/0.6.17/install.sh | sh
31+
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a
32+
with:
33+
version: "0.6.17"
3234

3335
- name: Install jq
3436
run: sudo apt-get update && sudo apt-get install -y jq

clients/python/tensorzero/generated_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ class DeleteDatapointsResponse:
113113
@dataclass(kw_only=True)
114114
class DemonstrationFeedbackFilter:
115115
"""
116-
Filter by whether an inference has demonstration feedback.
116+
Filter by whether an inference has a demonstration.
117117
"""
118118

119-
has_demonstration_feedback: bool
119+
has_demonstration: bool
120120

121121

122122
Detail = Literal["low", "high", "auto"]
@@ -470,7 +470,7 @@ class InferenceFilterBooleanMetric(BooleanMetricFilter):
470470
@dataclass(kw_only=True)
471471
class InferenceFilterDemonstrationFeedback(DemonstrationFeedbackFilter):
472472
"""
473-
Filter by whether an inference has demonstration feedback.
473+
Filter by whether an inference has a demonstration.
474474
"""
475475

476476
type: Literal["demonstration_feedback"] = "demonstration_feedback"

clients/rust/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ pub use tensorzero_core::db::clickhouse::query_builder::{
4545
TimeFilter,
4646
};
4747
pub use tensorzero_core::db::datasets::{
48-
CountDatapointsForDatasetFunctionParams, DatasetQueries, DatasetQueryParams,
49-
GetDatapointParams, GetDatapointsParams, GetDatasetMetadataParams,
48+
DatasetQueries, DatasetQueryParams, GetDatapointParams, GetDatapointsParams,
49+
GetDatasetMetadataParams,
5050
};
5151
pub use tensorzero_core::db::inferences::{InferenceOutputSource, ListInferencesParams};
5252
pub use tensorzero_core::db::stored_datapoint::{

gateway/src/routes/internal.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pub fn build_internal_non_otel_enabled_routes() -> Router<AppStateData> {
2121
"/internal/functions/{function_name}/variant_sampling_probabilities",
2222
get(endpoints::variant_probabilities::get_variant_sampling_probabilities_by_function_handler),
2323
)
24+
.route(
25+
"/internal/functions/{function_name}/metrics",
26+
get(endpoints::functions::internal::get_function_metrics_handler),
27+
)
2428
.route(
2529
"/internal/functions/{function_name}/inference-stats",
2630
get(endpoints::internal::inference_stats::get_inference_stats_handler),
@@ -41,6 +45,14 @@ pub fn build_internal_non_otel_enabled_routes() -> Router<AppStateData> {
4145
"/internal/ui-config",
4246
get(endpoints::ui::get_config::ui_config_handler),
4347
)
48+
.route(
49+
"/internal/episodes",
50+
get(endpoints::episodes::internal::list_episodes_handler),
51+
)
52+
.route(
53+
"/internal/episodes/bounds",
54+
get(endpoints::episodes::internal::query_episode_table_bounds_handler),
55+
)
4456
.route(
4557
"/internal/datasets/{dataset_name}/datapoints",
4658
post(endpoints::datasets::insert_from_existing_datapoint_handler),
@@ -53,6 +65,10 @@ pub fn build_internal_non_otel_enabled_routes() -> Router<AppStateData> {
5365
"/internal/datasets/{dataset_name}/datapoints/{datapoint_id}",
5466
put(endpoints::datasets::update_datapoint_handler),
5567
)
68+
.route(
69+
"/internal/datasets/{dataset_name}/datapoints/count",
70+
get(endpoints::datasets::internal::get_datapoint_count_handler),
71+
)
5672
.route(
5773
"/internal/object_storage",
5874
get(endpoints::object_storage::get_object_handler),

internal/tensorzero-node/lib/bindings/CountDatapointsForDatasetFunctionParams.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)