Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Arize-ai/phoenix into parth/audio-e…
Browse files Browse the repository at this point in the history
…vals
  • Loading branch information
21ShisodeParth committed Jan 10, 2025
2 parents 8448826 + 18fc144 commit 75af5c5
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/typescript-packages-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
run: pnpm install --frozen-lockfile -r
- name: Build
working-directory: ./js
run: pnpm run -r build
run: |
pnpm run -r build
git diff --exit-code
- name: Test
working-directory: ./js
run: pnpm run -r test
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/typescript-packages-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Typescript Packages Publish
on:
push:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
scope: "@arizeai"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9.8.0
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install Dependencies
working-directory: ./js
run: pnpm install --frozen-lockfile
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore(js): update versions"
title: "chore(js): update versions"
publish: pnpm ci:publish
cwd: "./js"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ examples/agent_framework_comparison/utils/saved_traces/*.parquet
!src/phoenix/evals/
/src/phoenix/otel
!src/phoenix/otel/

# Caches
.pnpm-store
2 changes: 1 addition & 1 deletion js/.changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["phoenix-experiment-runner"]
}
7 changes: 7 additions & 0 deletions js/packages/phoenix-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @arizeai/phoenix-client

## 0.0.1

### Patch Changes

- 76a9cdf: pre-release of phoenix-client
12 changes: 6 additions & 6 deletions js/packages/phoenix-client/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @arizeai/phoenix-client

This package provides a client for the Phoenix API.
This package provides a client for the Phoenix API. It is still under active development and is subject to change.

It utilizes [openapi-ts](https://openapi-ts.pages.dev/) to generate the types from the Phoenix OpenAPI spec.

Expand All @@ -21,11 +21,11 @@ The following environment variables are used:
- `PHOENIX_CLIENT_HEADERS` - Custom headers to add to all requests. A JSON stringified object.

```bash
PHOENIX_HOST=http://localhost:8000 PHOENIX_CLIENT_HEADERS='{"X-Custom-Header": "123"}' pnpx tsx examples/list_datasets.ts
PHOENIX_HOST=http://localhost:6006 PHOENIX_CLIENT_HEADERS='{"Authorization": "bearer xxxxxx"}' pnpx tsx examples/list_datasets.ts
# emits the following request:
# GET http://localhost:8000/v1/datasets
# GET http://localhost:6006/v1/datasets
# headers: {
# "X-Custom-Header": "123",
# "Authorization": "bearer xxxxxx",
# }
```

Expand All @@ -34,9 +34,9 @@ Alternatively, you can pass configuration options to the client directly, and th
```ts
const phoenix = createClient({
options: {
baseUrl: "http://localhost:8000",
baseUrl: "http://localhost:6006",
headers: {
"X-Custom-Header": "123",
Authorization: "bearer xxxxxx",
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion js/packages/phoenix-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arizeai/phoenix-client",
"version": "0.0.0",
"version": "0.0.1",
"description": "A client for the Phoenix API",
"main": "dist/src/index.js",
"module": "dist/esm/index.js",
Expand Down
5 changes: 5 additions & 0 deletions kustomize/auth/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bases:
- ../../base

patchesStrategicMerge:
- patches.yaml
22 changes: 22 additions & 0 deletions kustomize/auth/patches.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: phoenix
spec:
template:
spec:
containers:
- name: phoenix
env:
- name: PHOENIX_ENABLE_AUTH
value: "true"
# When enabling Auth, you must provide a secret
# For example, set a Kubernetes Secret with:
# kubectl create secret generic phoenix-secret --from-literal=secret-key='[YOUR-SECRET]'
# then use
# valueFrom:
# secretKeyRef:
# name: phoenix-secret
# key: secret-key
- name: PHOENIX_SECRET
value: "3413f9a7735bb780c6b8e4db7d946a492b64d26112a955cdea6a797f4c833593"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dev = [
"arize[AutoEmbeddings, LLM_Evaluation]",
"llama-index>=0.10.3",
"langchain>=0.0.334",
"litellm>=1.0.3",
"litellm>=1.0.3,<1.57.5", # windows compatibility broken on 1.57.5 (https://github.com/BerriAI/litellm/issues/7677)
"google-cloud-aiplatform>=1.3",
"anthropic",
"prometheus_client",
Expand Down
6 changes: 3 additions & 3 deletions requirements/unit-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ arize
asgi-lifespan
asyncpg
grpc-interceptor[testing]
httpx<0.28
httpx
httpx-ws
litellm>=1.0.3
litellm>=1.0.3,<1.57.5
nest-asyncio # for executor testing
numpy
openai>=1.0.0
Expand All @@ -18,7 +18,7 @@ psycopg[binary,pool]
pyarrow-stubs
pytest-postgresql
responses
respx # For OpenAI testing
respx>=0.22.0
syrupy
tenacity
tiktoken
Expand Down

0 comments on commit 75af5c5

Please sign in to comment.