-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move sample application to new examples/apps repo dir
- Loading branch information
1 parent
a414348
commit b8f1147
Showing
10 changed files
with
1,408 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Phoenix Experiment Runner | ||
|
||
This is an example app that uses the phoenix-client and @clack/prompts to run experiments. | ||
|
||
It runs against the `llama3.2` model, pointing to a local ollama instance. | ||
|
||
## Setup | ||
|
||
### Requirements | ||
|
||
- [Phoenix](https://phoenix.arize.com/) running locally on `http://localhost:6006` | ||
- `pnpm d:up` will start Phoenix | ||
- [Ollama](https://ollama.com/) with `llama3.2` installed | ||
- Node.js 20+ | ||
- pnpm | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
pnpm install | ||
pnpm -r build | ||
``` | ||
|
||
This will build all the dependencies in the monorepo and the app. | ||
|
||
### Run the app | ||
|
||
```bash | ||
pnpm d:up | ||
pnpm dev | ||
``` | ||
|
||
This will start Phoenix at `http://localhost:6006` and the app in watch mode. | ||
|
||
### Build the app | ||
|
||
```bash | ||
pnpm d:up | ||
pnpm build | ||
pnpm start | ||
``` | ||
|
||
This will start Phoenix and build the app, then run the app. |
6 changes: 6 additions & 0 deletions
6
js/examples/apps/phoenix-experiment-runner/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
phoenix: | ||
image: arizephoenix/phoenix:latest | ||
ports: | ||
- "6006:6006" # UI and OTLP HTTP collector | ||
- "4317:4317" # OTLP gRPC collector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "phoenix-experiment-runner", | ||
"version": "1.0.0", | ||
"description": "An example app that uses the phoenix-client to run experiments", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"private": true, | ||
"dependencies": { | ||
"@arizeai/phoenix-client": "workspace:*", | ||
"@clack/prompts": "^0.8.2", | ||
"autoevals": "^0.0.111" | ||
}, | ||
"scripts": { | ||
"start": "node dist/index.js", | ||
"d:up": "docker compose up -d", | ||
"d:down": "docker compose down", | ||
"build": "tsc", | ||
"dev": "tsx watch index.ts" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@types/node": "^20.14.11", | ||
"rimraf": "^5.0.10", | ||
"tsx": "^4.19.1", | ||
"typescript": "^5.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Base Options: */ | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"target": "es2022", | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"moduleDetection": "force", | ||
"isolatedModules": true, | ||
"verbatimModuleSyntax": true, | ||
|
||
/* Strictness */ | ||
"strict": true, | ||
"noUncheckedIndexedAccess": true, | ||
"noImplicitOverride": true, | ||
|
||
/* If transpiling with TypeScript: */ | ||
"module": "NodeNext", | ||
"outDir": "dist", | ||
"sourceMap": true, | ||
|
||
/* If your code doesn't run in the DOM: */ | ||
"lib": ["es2022"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.