You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Keep this SSH session open** while using the tool.
21
+
-**If you run the script multiple times** - it updates `.env` with new port numbers each time
22
+
-**Always use the latest SSH session** created by the most recent script run for starting your backend container
31
23
32
24
### 2. Start Backend on Hopper
33
25
34
-
SSH into Hopper and
35
-
1. cd into `/scratch_aisg/SPEC-SF-AISG/tools/compare`
36
-
2. There should be 3 things there: A sqsh file, a script (sh), and a copy of this repository.
37
-
3. Run the script with `./llm-eval.sh`
26
+
In the **same SSH session** opened by `hopper_connect.sh`:
38
27
39
-
**What happens under the hood:**
40
-
- Enroot creates a container from the `.sqsh` image (contains all Python packages we need for the backend.)
41
-
- Mounts the code directory (`llm-eval-compare`). Container will run the backend code later.
42
-
- Mounts the data directory, hardcoded to `/scratch_aisg/SPEC-SF-AISG/xb.yong/results`.
43
-
- Sets environment variables so the backend knows where to find data
44
-
- The backend validates data on startup and prints status
28
+
```bash
29
+
cd /scratch_aisg/SPEC-SF-AISG/tools/compare
30
+
./llm-eval.sh
31
+
```
45
32
46
-
### 3. Run Frontend Locally
33
+
The `LLM_EVAL_PORT` environment variable is already set correctly in this session.
47
34
48
-
Now start another terminal window from this repository's home directory:
49
-
**z️ IMPORTANT**: This application uses PySide6 and certain libraries to fetch images from HuggingFace, so you are required to install them **in your machine**. See `requirements-frontend.txt`. If you have a suitable venv already, consider using it.
35
+
### 3. Run Frontend Locally
50
36
37
+
In a **new terminal** window:
51
38
52
39
```bash
53
-
# OPTIONAL: For safety, install these packages in a venv
54
-
# This application uses PySide6 and certain libraries to fetch images from HuggingFace.
40
+
# Install dependencies (first time only)
55
41
pip install -r requirements-frontend.txt
56
42
57
-
# Set the API URL to match your forwarded port
58
-
export LLM_EVAL_API_URL=http://localhost:8000
59
-
# Use the LOCAL port that you used for forwarding. If you used the bash script `llm-eval.sh`, port is 8000
60
-
61
-
# Run the GUI
62
-
python -m frontend/gui.py
43
+
# Run the frontend
44
+
./start_frontend.sh
63
45
```
64
46
65
-
The GUI will connect to the backend through your SSH tunnel.
47
+
The frontend reads port numbers from the `.env` file automatically. Port numbers are saved there by `hopper_connect.sh`.
66
48
67
49
## User Preferences
68
50
69
-
Customize field display and UI buttons by editing:
70
-
71
-
```
72
-
frontend/config/user_preferences.yaml
73
-
```
74
-
75
-
### How User Preferences Work
76
-
77
-
Preferences are scoped hierarchically (later overrides earlier):
78
-
79
-
1.**Global preferences** - Apply to all tasks/files
80
-
2.**Task-specific preferences** - Override global for specific tasks
81
-
3.**File pattern preferences** - Override for files matching patterns
82
-
83
-
### Common Customizations
84
-
85
-
**Hide a field globally:**
86
-
```yaml
87
-
global:
88
-
image_url:
89
-
display_mode: hidden
90
-
```
91
-
92
-
**Show a field for specific tasks:**
93
-
```yaml
94
-
by_task:
95
-
mmlu_pro:
96
-
options:
97
-
display_mode: tree
98
-
priority: 15
99
-
```
100
-
101
-
**Configure UI buttons:**
102
-
```yaml
103
-
ui_buttons:
104
-
default:
105
-
- field: prompt_text
106
-
label: Query
107
-
enabled: true
108
-
priority: 10
109
-
# Add more buttons...
110
-
```
111
-
112
-
**Note**: If you have preferences that should be defaults for everyone, let us know and we can add them to the repository.
113
-
114
-
## Project Structure
115
-
116
-
For developers who need to modify the codebase:
117
-
118
-
```
119
-
backend/
120
-
├── core/ # Core implementation
121
-
│ ├── handlers/ # Endpoint business logic
122
-
│ │ └── runs.py # Functions like load_runs(), convert_to_run_details()
123
-
│ ├── adapters/ # Data access layer
124
-
│ │ ├── filesystem.py # Read from local filesystem
0 commit comments