Skip to content

Commit 499612d

Browse files
committed
init
0 parents  commit 499612d

14 files changed

+4948
-0
lines changed

Diff for: .eslintrc.cjs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:react/recommended',
7+
'plugin:react/jsx-runtime',
8+
'plugin:react-hooks/recommended',
9+
],
10+
ignorePatterns: ['dist', '.eslintrc.cjs'],
11+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12+
settings: { react: { version: '18.2' } },
13+
plugins: ['react-refresh'],
14+
rules: {
15+
'react/jsx-no-target-blank': 'off',
16+
'react-refresh/only-export-components': [
17+
'warn',
18+
{ allowConstantExport: true },
19+
],
20+
},
21+
}

Diff for: .gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

Diff for: README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SQL-Eval Visualizer
2+
3+
This repo helps visualize the results of sql-eval better, and checking where the model is performing suboptimally and what are the tokens where it is losing confidence.
4+
5+
## Running the repo
6+
1. Make sure that this repo is contained within the `sql-eval` folder
7+
2. `cd` into the folder containing this repo, and install dependencies with `npm i`
8+
3. Run the repo with `npm run dev`
9+
4. Profit!
10+
11+
## Adding data from a vLLM API run
12+
_Note: Currently, only the custom Defog implementation of the vLLM API server is supported. We hope to expand this to other runners in the future._
13+
14+
Run sql-eval using the vLLM API runner, and with the `--logprobs` command line parameter enabled, like below.
15+
16+
```bash
17+
python main.py \
18+
-db postgres \
19+
-q "data/questions_gen_postgres.csv" "data/instruct_basic_postgres.csv" "data/instruct_advanced_postgres.csv" \
20+
-o results/api_bs32_exp.csv results/api_basic_bs32_exp.csv results/api_advanced_bs32_exp.csv \
21+
-g api \
22+
-b 1 \
23+
-f prompts/prompt.md \
24+
--api_url "http://209.20.159.234:5000/generate" \
25+
--api_type "vllm" \
26+
-p 20 \
27+
-c 0 \
28+
--logprobs
29+
```
30+
31+
## TODO
32+
33+
- [ ] Let users run queries with a single click, and see results
34+
- [ ] Compare the results of 2 different runs, instead of just looking at results from a single run
35+
- [ ] Let users manually mark some squares as "almost correct", or "partially correct" in the UI, in order to differentiate responses that are _almost_ correct with those that are very off

Diff for: index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Defog Eval Visualizer</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.jsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)