Skip to content

Commit fdca5c1

Browse files
committed
More quality of life for GUI implementation
1 parent 91a4aee commit fdca5c1

7 files changed

Lines changed: 788 additions & 108 deletions

File tree

docs/docs/gui.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@ PartiNet includes a browser-based graphical interface built with Gradio. It cove
1414
partinet gui
1515
```
1616

17-
Gradio will automatically select a free port and print the URL to the terminal:
17+
Gradio will print the URL to the terminal. On a login node, use `127.0.0.1` or `localhost` — not `0.0.0.0`, which is only a bind address.
1818

1919
```
20-
Running on local URL: http://0.0.0.0:54321
20+
Running on local URL: http://127.0.0.1:7860
2121
```
2222

23-
Open that URL in your browser. If you are connecting over SSH, set up port forwarding for the printed port.
23+
Open that URL in your browser on the login node, or set up SSH port forwarding from your laptop:
24+
25+
```shell
26+
ssh -L 7860:127.0.0.1:7860 user@login-node
27+
```
28+
29+
Then open `http://localhost:7860` in your local browser.
2430

2531
### Options
2632

2733
| Option | Default | Description |
2834
|--------|---------|-------------|
29-
| `--host` | `0.0.0.0` | Host address to bind the server to |
35+
| `--host` | `127.0.0.1` | Host address to bind the server to |
3036
| `--port` | auto | Port to run the GUI on; auto-selects a free port if omitted |
3137
| `--share` | off | Create a temporary public Gradio link (useful for remote sharing) |
3238

@@ -53,6 +59,30 @@ The **Project directory** field at the top of the GUI is set once and auto-fills
5359

5460
Individual fields remain editable if you need to override a path for a specific stage.
5561

62+
## Running jobs
63+
64+
Open the **Running jobs** accordion (below the project directory) to see active jobs submitted from the GUI for the current project. The table refreshes automatically every five seconds, or click **Refresh**.
65+
66+
| Column | Description |
67+
|--------|-------------|
68+
| Stage | `denoise`, `detect`, or `star` |
69+
| Mode | `local` or `slurm` |
70+
| ID | Slurm job ID or local process ID |
71+
| Status | `running`, `pending`, etc. |
72+
| Started | UTC timestamp when the job was submitted |
73+
74+
To cancel a job, select it from **Select job** and click **Cancel selected**. Local jobs are terminated; Slurm jobs receive `scancel`. Job metadata is stored in `<project>/.partinet_jobs/manifest.json` so Slurm jobs remain visible (and cancellable) after a browser refresh.
75+
76+
Selecting a job in the dropdown shows its live log in **Job log** (refreshed every five seconds while selected). Logs are read from the stage log file (`partinet_denoise.log`, etc.) and, for Slurm jobs, the batch script output under `.partinet_jobs/`.
77+
78+
Only jobs submitted from this GUI session for the current project directory are listed.
79+
80+
## Appearance
81+
82+
The GUI uses the [lone17/kotaemon](https://huggingface.co/spaces/lone17/kotaemon) Gradio theme and opens in **dark mode** by default (via `?__theme=dark` on first load). You can switch to light or system mode using Gradio’s theme toggle in the footer.
83+
84+
The theme is downloaded from the Hugging Face Hub on first launch (requires network once; cached afterward). Star File statistics plots use a dark matplotlib style to match the UI.
85+
5686
Optional environment variables at launch:
5787

5888
- `PARTINET_PROJECT` — pre-fill the project directory

partinet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def denoise(source, project, num_workers,img_format):
106106
partinet.process_utils.pooled_denoise_proc.main(source,project,num_workers,img_format)
107107

108108
@main.command()
109-
@click.option('--host', default='0.0.0.0', show_default=True, help='Host to bind the GUI server to')
109+
@click.option('--host', default='127.0.0.1', show_default=True, help='Host to bind the GUI server to')
110110
@click.option('--port', default=None, type=int, help='Port to run the GUI on (default: auto-select)')
111111
@click.option('--share', is_flag=True, help='Create a public Gradio share link')
112112
def gui(host, port, share):

0 commit comments

Comments
 (0)