epokio 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. epokio-0.3.0/LICENSE +21 -0
  2. epokio-0.3.0/PKG-INFO +73 -0
  3. epokio-0.3.0/PYPI.md +46 -0
  4. epokio-0.3.0/README.md +376 -0
  5. epokio-0.3.0/pyproject.toml +48 -0
  6. epokio-0.3.0/setup.cfg +4 -0
  7. epokio-0.3.0/src/epokio/__init__.py +39 -0
  8. epokio-0.3.0/src/epokio/__main__.py +4 -0
  9. epokio-0.3.0/src/epokio/adapters.py +367 -0
  10. epokio-0.3.0/src/epokio/agent.py +530 -0
  11. epokio-0.3.0/src/epokio/analysis.py +161 -0
  12. epokio-0.3.0/src/epokio/auth.py +94 -0
  13. epokio-0.3.0/src/epokio/autostart.py +154 -0
  14. epokio-0.3.0/src/epokio/cli.py +59 -0
  15. epokio-0.3.0/src/epokio/config.py +59 -0
  16. epokio-0.3.0/src/epokio/diagnose.py +65 -0
  17. epokio-0.3.0/src/epokio/discover.py +69 -0
  18. epokio-0.3.0/src/epokio/envs.py +229 -0
  19. epokio-0.3.0/src/epokio/health.py +238 -0
  20. epokio-0.3.0/src/epokio/i18n.py +193 -0
  21. epokio-0.3.0/src/epokio/jobs.py +694 -0
  22. epokio-0.3.0/src/epokio/jsonfile.py +68 -0
  23. epokio-0.3.0/src/epokio/logger.py +249 -0
  24. epokio-0.3.0/src/epokio/mcp_server.py +209 -0
  25. epokio-0.3.0/src/epokio/monitor.py +94 -0
  26. epokio-0.3.0/src/epokio/msg.py +151 -0
  27. epokio-0.3.0/src/epokio/notify.py +77 -0
  28. epokio-0.3.0/src/epokio/onboard.py +378 -0
  29. epokio-0.3.0/src/epokio/report.py +141 -0
  30. epokio-0.3.0/src/epokio/rundetail.py +137 -0
  31. epokio-0.3.0/src/epokio/runmeta.py +137 -0
  32. epokio-0.3.0/src/epokio/scan.py +411 -0
  33. epokio-0.3.0/src/epokio/server.py +273 -0
  34. epokio-0.3.0/src/epokio/sources.py +28 -0
  35. epokio-0.3.0/src/epokio/sysinfo.py +272 -0
  36. epokio-0.3.0/src/epokio/textnorm.py +79 -0
  37. epokio-0.3.0/src/epokio/tfevents.py +199 -0
  38. epokio-0.3.0/src/epokio/tray.py +276 -0
  39. epokio-0.3.0/src/epokio/tui.py +283 -0
  40. epokio-0.3.0/src/epokio/versions.py +78 -0
  41. epokio-0.3.0/src/epokio/watcher.py +159 -0
  42. epokio-0.3.0/src/epokio/web/index.html +1344 -0
  43. epokio-0.3.0/src/epokio.egg-info/PKG-INFO +73 -0
  44. epokio-0.3.0/src/epokio.egg-info/SOURCES.txt +71 -0
  45. epokio-0.3.0/src/epokio.egg-info/dependency_links.txt +1 -0
  46. epokio-0.3.0/src/epokio.egg-info/entry_points.txt +6 -0
  47. epokio-0.3.0/src/epokio.egg-info/requires.txt +10 -0
  48. epokio-0.3.0/src/epokio.egg-info/top_level.txt +1 -0
  49. epokio-0.3.0/tests/test_adapters.py +308 -0
  50. epokio-0.3.0/tests/test_agent_inputs.py +324 -0
  51. epokio-0.3.0/tests/test_analysis_notes.py +28 -0
  52. epokio-0.3.0/tests/test_auth.py +117 -0
  53. epokio-0.3.0/tests/test_diagnose.py +43 -0
  54. epokio-0.3.0/tests/test_envs.py +127 -0
  55. epokio-0.3.0/tests/test_eval_helpers.py +69 -0
  56. epokio-0.3.0/tests/test_events.py +111 -0
  57. epokio-0.3.0/tests/test_health.py +100 -0
  58. epokio-0.3.0/tests/test_house_rules.py +41 -0
  59. epokio-0.3.0/tests/test_jobs_kill.py +59 -0
  60. epokio-0.3.0/tests/test_logger.py +168 -0
  61. epokio-0.3.0/tests/test_mcp.py +114 -0
  62. epokio-0.3.0/tests/test_msg.py +58 -0
  63. epokio-0.3.0/tests/test_onboard.py +278 -0
  64. epokio-0.3.0/tests/test_queue.py +205 -0
  65. epokio-0.3.0/tests/test_rundetail.py +78 -0
  66. epokio-0.3.0/tests/test_runmeta.py +72 -0
  67. epokio-0.3.0/tests/test_server.py +309 -0
  68. epokio-0.3.0/tests/test_sysinfo.py +31 -0
  69. epokio-0.3.0/tests/test_textnorm.py +25 -0
  70. epokio-0.3.0/tests/test_tfevents.py +152 -0
  71. epokio-0.3.0/tests/test_tray.py +81 -0
  72. epokio-0.3.0/tests/test_tui.py +46 -0
  73. epokio-0.3.0/tests/test_web.py +286 -0
epokio-0.3.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 8rulerstar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
epokio-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: epokio
3
+ Version: 0.3.0
4
+ Summary: Watch, compare, queue and report ML training runs (Ultralytics, Hugging Face, Lightning, Keras, TensorBoard) from a menu bar, tray, terminal or web page.
5
+ Author: 8rulerstar
6
+ License-Expression: MIT
7
+ Keywords: machine learning,training,monitoring,ultralytics,yolo,tensorboard,experiment tracking
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Web Environment
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Classifier: Topic :: System :: Monitoring
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: windows-curses; sys_platform == "win32"
21
+ Provides-Extra: tray
22
+ Requires-Dist: pystray>=0.19; extra == "tray"
23
+ Requires-Dist: Pillow>=10.0; extra == "tray"
24
+ Provides-Extra: mcp
25
+ Requires-Dist: mcp>=2.2; extra == "mcp"
26
+ Dynamic: license-file
27
+
28
+ # Epokio
29
+
30
+ Watch, compare, queue and report machine learning training runs from a web page, a tray icon, a terminal
31
+ or the macOS menu bar. Epokio reads the files your framework already writes, so there is no logging code
32
+ to add, no account and no cloud.
33
+
34
+ ## What it does
35
+
36
+ * **See every run** on this machine or a remote GPU box: state, epoch, time left, best score, curves,
37
+ plain-language notes ("recall is much higher than precision…") and the result images your framework saved.
38
+ * **Get told** when a run finishes, fails (NaN loss), stalls or reaches a target score: on the Mac, in the
39
+ tray, or as a phone push (ntfy, Slack, Discord, Telegram).
40
+ * **Compare runs**: only the settings that differ, a settings table for a whole sweep next to each run's
41
+ main score, CSV export and Markdown reports.
42
+ * **Start and queue runs** (Ultralytics YOLO) from the web page, one at a time, with a data check before
43
+ starting, a one-button Python setup (CUDA PyTorch on NVIDIA machines), resume from `weights/last.pt`,
44
+ and failure causes in plain words.
45
+ * **AI assistants** can read and queue runs through the MCP server (`pip install "epokio[mcp]"`).
46
+
47
+ Reads Ultralytics (`results.csv`), Hugging Face Trainer (`trainer_state.json`), PyTorch Lightning
48
+ (`metrics.csv`), Keras (`CSVLogger`) and TensorBoard event files (read without TensorFlow). A hand-written
49
+ loop shows up with two lines:
50
+
51
+ ```python
52
+ import epokio
53
+ with epokio.start("runs/my-model", epochs=50, lr=1e-4) as run:
54
+ for epoch in range(50):
55
+ ...
56
+ run.log(val_loss=vl, accuracy=acc)
57
+ ```
58
+
59
+ ## Start
60
+
61
+ ```
62
+ pip install epokio
63
+ epokio setup # finds your runs, starts the helper, opens the page
64
+ epokio setup --lan # also let your phone or another computer watch this machine
65
+ ```
66
+
67
+ Other commands: `epokio watch` (terminal view, good over SSH), `epokio tray` (`pip install "epokio[tray]"`),
68
+ `epokio doctor` (what Epokio sees, for a bug report), `epokio agent --stop`.
69
+
70
+ Viewing is open on this machine; anything that starts, stops or changes something needs the machine's token
71
+ (`epokio agent --show-token`). The helper uses only the Python standard library.
72
+
73
+ MIT licence.
epokio-0.3.0/PYPI.md ADDED
@@ -0,0 +1,46 @@
1
+ # Epokio
2
+
3
+ Watch, compare, queue and report machine learning training runs from a web page, a tray icon, a terminal
4
+ or the macOS menu bar. Epokio reads the files your framework already writes, so there is no logging code
5
+ to add, no account and no cloud.
6
+
7
+ ## What it does
8
+
9
+ * **See every run** on this machine or a remote GPU box: state, epoch, time left, best score, curves,
10
+ plain-language notes ("recall is much higher than precision…") and the result images your framework saved.
11
+ * **Get told** when a run finishes, fails (NaN loss), stalls or reaches a target score: on the Mac, in the
12
+ tray, or as a phone push (ntfy, Slack, Discord, Telegram).
13
+ * **Compare runs**: only the settings that differ, a settings table for a whole sweep next to each run's
14
+ main score, CSV export and Markdown reports.
15
+ * **Start and queue runs** (Ultralytics YOLO) from the web page, one at a time, with a data check before
16
+ starting, a one-button Python setup (CUDA PyTorch on NVIDIA machines), resume from `weights/last.pt`,
17
+ and failure causes in plain words.
18
+ * **AI assistants** can read and queue runs through the MCP server (`pip install "epokio[mcp]"`).
19
+
20
+ Reads Ultralytics (`results.csv`), Hugging Face Trainer (`trainer_state.json`), PyTorch Lightning
21
+ (`metrics.csv`), Keras (`CSVLogger`) and TensorBoard event files (read without TensorFlow). A hand-written
22
+ loop shows up with two lines:
23
+
24
+ ```python
25
+ import epokio
26
+ with epokio.start("runs/my-model", epochs=50, lr=1e-4) as run:
27
+ for epoch in range(50):
28
+ ...
29
+ run.log(val_loss=vl, accuracy=acc)
30
+ ```
31
+
32
+ ## Start
33
+
34
+ ```
35
+ pip install epokio
36
+ epokio setup # finds your runs, starts the helper, opens the page
37
+ epokio setup --lan # also let your phone or another computer watch this machine
38
+ ```
39
+
40
+ Other commands: `epokio watch` (terminal view, good over SSH), `epokio tray` (`pip install "epokio[tray]"`),
41
+ `epokio doctor` (what Epokio sees, for a bug report), `epokio agent --stop`.
42
+
43
+ Viewing is open on this machine; anything that starts, stops or changes something needs the machine's token
44
+ (`epokio agent --show-token`). The helper uses only the Python standard library.
45
+
46
+ MIT licence.
epokio-0.3.0/README.md ADDED
@@ -0,0 +1,376 @@
1
+ <p align="center">
2
+ <img src="docs/images/icon.png" width="128" alt="Epokio icon">
3
+ </p>
4
+
5
+ <h1 align="center">Epokio</h1>
6
+
7
+ <p align="center">
8
+ See your model training from the macOS menu bar, or from a web page on Windows, Linux and your phone.<br>
9
+ Start runs, queue them, auto-label images, and read the results without opening a browser.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="#install">Install</a> ·
14
+ <a href="#what-it-does">What it does</a> ·
15
+ <a href="#remote-gpu">Remote GPU</a> ·
16
+ <a href="#on-windows-linux-or-your-phone">Windows / Linux</a> ·
17
+ <a href="#한국어">한국어</a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ <p align="center">
23
+ <img src="docs/images/popover-light.png" width="360" alt="Menu bar popover, light">
24
+ <img src="docs/images/popover-dark.png" width="360" alt="Menu bar popover, dark">
25
+ </p>
26
+
27
+ ## Why
28
+
29
+ Training a model means waiting. You start a run, then keep opening a terminal or a browser tab to see
30
+ whether it is still alive, how many epochs are left, and whether the score is still going up.
31
+
32
+ Epokio puts that answer one glance away, in the menu bar, and gives beginners a way to start a run
33
+ without writing a command.
34
+
35
+ * **No code changes.** It reads the files your framework already writes (`results.csv`, `args.yaml`).
36
+ * **Nothing to sign up for.** Everything runs on your machines.
37
+ * **Native macOS.** Follows dark mode, your accent color, Reduce Motion, Increase Contrast.
38
+
39
+ ## Problems it solves
40
+
41
+ * **"Is my training still running?"** See epoch, time left and best score in the macOS menu bar, without opening a terminal, TensorBoard or a browser tab.
42
+ * **"Tell me when YOLO training finishes."** A notification on your Mac, and a push to your phone (ntfy, Slack, Discord, Telegram), when a run finishes, fails, stalls or reaches a target score.
43
+ * **"Loss became NaN overnight."** Epokio flags diverged runs (NaN loss) and runs that stopped updating, so you do not find out in the morning.
44
+ * **"Which run was better?"** Compare Ultralytics, Hugging Face, PyTorch Lightning, Keras or TensorBoard-logged runs on one chart and in one table.
45
+ * **"Where does my model get it wrong?"** Rank validation images by score and review the worst ones, with labels and predictions drawn on top.
46
+ * **"I have to watch a GPU server over SSH."** `epokio watch` in the terminal, or open the web page from any laptop or phone.
47
+
48
+ ## What it does
49
+
50
+ ### Menu bar
51
+
52
+ * Progress, time left, and best score of every run, updated live
53
+ * GPU, CPU and memory, like Activity Monitor (Apple Silicon and NVIDIA)
54
+ * A notification when a run **finishes**, **fails** (loss became NaN), **stalls**, or **stops before its last epoch**
55
+ * A calm resting view when nothing is training
56
+ * **Just finished** card at the top: one click to the results
57
+
58
+ ### Results
59
+
60
+ <p align="center">
61
+ <img src="docs/images/studio-runs.png" width="620" alt="Run results">
62
+ </p>
63
+
64
+ Click any run to see what happened, in one place:
65
+
66
+ * **Scores** at the best epoch: precision, recall, F1, mAP50, mAP50-95, per head (box, pose, mask). Hover for what each one means.
67
+ * **Curves** for loss and scores, live while training runs
68
+ * **What stands out:** plain-language notes with a next step, such as *"Recall is much higher than precision. It finds most objects but raises many false alarms."*
69
+ * **Result images** your framework saved (curves, confusion matrix, predictions next to your labels), also from remote machines
70
+ * **Next steps:** try this model, review its mistakes, train again with the same settings, or resume a stopped run from `weights/last.pt`
71
+
72
+ **Compare** two to four runs on one chart and in one table. **Notifications** stay in the bell at the top right, so a run that finished overnight is still there in the morning.
73
+
74
+ <p align="center">
75
+ <img src="docs/images/studio-compare.png" width="620" alt="Compare runs">
76
+ </p>
77
+
78
+ ### Studio window
79
+
80
+ <p align="center">
81
+ <img src="docs/images/studio-train.png" width="620" alt="Studio, new training">
82
+ </p>
83
+
84
+ **For beginners:** drop your `data.yaml` and Epokio checks it first: missing labels, classes with no examples, a validation set that is too small, very unbalanced classes. No dataset yet? Start with a tiny 8-image sample. Then pick a task (detect, segment, pose, classify), a model size and
85
+ the number of epochs, then press Start.
86
+
87
+ **For experts:** turn on *Show all settings* to get every training option of your installed Ultralytics
88
+ version, with its description. The list is generated from Ultralytics' own config file, so it stays
89
+ current when Ultralytics updates.
90
+
91
+ * **Try it:** drop an image and see what your model finds, with class names and confidence. Uses the CPU while a training run is using the GPU.
92
+ * **Datasets:** see your images with their YOLO boxes and pose keypoints drawn on top. Filter by class, find images with no label, flip through with the arrow keys. No separate labeling tool needed.
93
+ * **Review:** find your best and worst images. Labels are drawn in green, predictions in red, so you see at once what the model missed or invented. Mark each one as *model wrong*, *label wrong* or *not sure* with one key, and get a CSV for fixing labels or retraining.
94
+ * **Queue:** runs one job at a time (one GPU), survives restarts, reorder and cancel, live logs
95
+ * **Auto-label:** pick a model and a folder of images. Labels are written to a separate `labels_auto/`
96
+ folder, so your existing labels are never overwritten. You get a summary of what to review.
97
+ * **Reports:** a Markdown report with a leaderboard, precision, recall, F1 and mAP per head,
98
+ the charts your framework produced, and plain-language notes such as
99
+ *"Validation loss bottomed at epoch 32 and rose afterwards. The model may be overfitting."*
100
+
101
+ <p align="center">
102
+ <img src="docs/images/studio-datasets.png" width="620" alt="Datasets, labels drawn on images">
103
+ </p>
104
+
105
+ ## Install
106
+
107
+ > **On Windows or Linux?** Skip to [On Windows, Linux or your phone](#on-windows-linux-or-your-phone). This section is the Mac app.
108
+
109
+ 1. Download `Epokio-x.y.z.dmg` from [Releases](https://github.com/8rulerstar/epokio/releases/latest) and drag Epokio to Applications.
110
+ 2. Open it. That is all.
111
+
112
+ The app carries its own helper (the *agent*) and starts it with any Python 3.10 or later already on your
113
+ Mac (Anaconda, Homebrew or python.org; the Python that comes with Xcode is 3.9, too old). With none, it
114
+ offers to download a small private Python for itself (about 25 MB). It then looks for training folders on its own, and
115
+ opens the Studio window so you can start even if the menu bar icon is hidden behind the notch.
116
+
117
+ A separate `pip install` is needed only on **other** machines that train, such as a Windows GPU PC
118
+ (see [Remote GPU](#remote-gpu)).
119
+
120
+ > **First launch:** the app is not notarized yet, so macOS 15 blocks it the first time. Open it once, then go to
121
+ > **System Settings → Privacy & Security**, scroll down and click **Open Anyway** next to Epokio.
122
+ >
123
+ > **Icon missing from the menu bar?** On macOS 26 and later, allow Epokio in
124
+ > **System Settings → Menu Bar**.
125
+
126
+ ### Build from source
127
+
128
+ ```bash
129
+ git clone https://github.com/8rulerstar/epokio && cd epokio
130
+ python3 -m venv .venv && .venv/bin/pip install -e .
131
+ cd mac && ./build_app.sh --dmg # build/Epokio.app and build/Epokio-x.y.z.dmg
132
+ ```
133
+
134
+ Requires macOS 15 or later and Xcode command line tools. Training itself needs a Python
135
+ environment with `ultralytics` and `torch`. Epokio finds your environments automatically.
136
+
137
+ ## Remote GPU
138
+
139
+ Train on a Windows or Linux machine, watch from your Mac.
140
+
141
+ ```bash
142
+ # on the training machine
143
+ pip install epokio
144
+ epokio setup --lan --autostart
145
+ ```
146
+
147
+ `epokio setup` finds your training folders, starts the helper without a console window, prints the
148
+ token to paste into the Mac app, and opens the page. `--lan` lets other machines on your network
149
+ reach it; `--autostart` brings the tray back when you log in. Run it again any time, it changes
150
+ nothing that is already right.
151
+
152
+ Without `--lan` the helper listens on this machine only, which is what you want if you just came
153
+ for the web page and the tray.
154
+
155
+ `--label lab-07` sets the name this machine shows as (handy when a class or a team watches many
156
+ machines; the default is the computer name). Over SSH, setup prints an `ssh -L` tunnel command
157
+ instead of opening a browser.
158
+
159
+ The helper answers when you reach it by IP address, `localhost`, or a name whose first part is this
160
+ machine's name (`pc`, `pc.lan`, `pc.tailXXXX.ts.net`; not `pc2.lan`). This blocks DNS-rebinding pages. For any other
161
+ name, set `EPOKIO_ALLOWED_HOSTS=trainer.example,other.name` on this machine, or send the token.
162
+
163
+ Install it wherever you like. The agent needs no third-party packages, so a small separate
164
+ virtual environment is the safe choice if you would rather not touch the Python your training uses.
165
+
166
+ * Watching needs no token: runs, scores, curves, notes and result images. Result images are
167
+ served only from the folders the agent watches.
168
+ * **Everything else needs the token**, including requests that only look like reading: listing your
169
+ Python environments, reading a training log, and checking a dataset folder all run a process or
170
+ read outside the watched folders.
171
+ * Use it on your own network only. The agent has no TLS.
172
+ * Korean and other non-ASCII file names are normalized between macOS (NFD) and Windows (NFC),
173
+ so a path chosen on the Mac is found on the PC.
174
+
175
+ ## On Windows, Linux or your phone
176
+
177
+ **You do not need a Mac.** Install on the machine that trains, run one command, and you have the
178
+ progress, scores, curves, result images, comparisons and phone alerts.
179
+
180
+ **Never used a terminal? On Windows:** download `Epokio.exe` from
181
+ [Releases](https://github.com/8rulerstar/epokio/releases/latest) and double-click it. It needs no Python to watch.
182
+ To train from the Train tab, install Python 3.10 or later first; the tab then sets up PyTorch and Ultralytics with one button. Windows SmartScreen may warn about an
183
+ unsigned app the first time: choose **More info → Run anyway**.
184
+
185
+ **With Python** (3.10 or later; from [python.org](https://www.python.org/downloads/), tick **Add python.exe to PATH**):
186
+
187
+ ```bash
188
+ py -m pip install "epokio[tray]"
189
+ py -m epokio setup --autostart
190
+ ```
191
+
192
+ (If typing `epokio` says "not recognized", use `py -m epokio` instead; it is the same command.)
193
+
194
+ **On a Linux server (Ubuntu 24.04, no desktop, over SSH):** system `pip` refuses to install
195
+ (PEP 668), so use a small virtual environment:
196
+
197
+ ```bash
198
+ sudo apt install python3-venv
199
+ python3 -m venv ~/.epokio-venv
200
+ ~/.epokio-venv/bin/pip install epokio # no tray needed
201
+ ~/.epokio-venv/bin/python -m epokio setup --root /data/runs --autostart
202
+ ```
203
+
204
+ On a machine without a display, `--autostart` writes a systemd user service instead of a tray entry
205
+ and prints the two commands that turn it on. Setup does not open a browser there; it prints an
206
+ `ssh -L 8787:127.0.0.1:8787 <server>` command, and then `http://127.0.0.1:8787/` works on your own
207
+ computer. That tunnel is the safest way in. If you use `--lan` instead and ufw is on, allow your
208
+ network only: `sudo ufw allow from 192.168.0.0/16 to any port 8787 proto tcp`. Runs outside your home
209
+ folder (`/data`, `/mnt`, `/workspace`) are not found on their own, so pass `--root`. To log from your
210
+ own training code with `epokio.start`, install Epokio into the **training** environment too.
211
+
212
+ That finds your training folders, starts the helper with no console window, opens the page already
213
+ unlocked, and makes the tray come back when you log in. With `--lan`, Windows asks whether Python may
214
+ use the network: tick **Private networks** and click **Allow**, or your phone cannot connect. Turn that last part off again with
215
+ `epokio autostart --off`, or from the tray menu (*Start when I log in*). The entry is an ordinary
216
+ shortcut in your Startup folder, so you can also just delete it.
217
+
218
+ Review, auto-labelling and the label viewer are in the Mac app only. Everything else here works
219
+ without one:
220
+
221
+ **Your own training loop.** Not using Ultralytics, Hugging Face, Lightning or Keras? Two lines make it show up like any other run:
222
+
223
+ ```python
224
+ import epokio
225
+ with epokio.start("runs/detr-small", epochs=50, lr=1e-4, batch=16) as run:
226
+ for epoch in range(1, 51):
227
+ ...
228
+ run.log(train_loss=tl, val_loss=vl, precision=p, recall=r, mAP50=m) # tensors are fine
229
+ ```
230
+
231
+ Logging never stops your training, even when the file is busy. In multi-GPU training only rank 0 writes. In a notebook, use the `with` block or call `run.finish()` after the loop, so the run shows as done; a run that ends with an error is never marked done.
232
+
233
+ **A web page.** On the training PC open `http://127.0.0.1:8787/` (setup opens it for you). From your phone or another computer, use the address setup printed (needs `--lan`). It works in any browser, to see runs, scores, curves, notes, result images, comparisons and notifications. No install, no account. The **Train** and **Queue** tabs start runs, reorder or remove what is waiting, show each job's log, and stop the one that is running after asking you. Pick what the model should learn and how big it is, and Train fills in the model; it checks the dataset before starting and stops you if it is broken. With no Python for training yet, one button sets one up (with CUDA PyTorch on a PC with an NVIDIA GPU). The queue shows the epoch, time left and finish time of the running job, and when a job fails it says why in plain words and what to change (GPU out of memory, Windows data loader workers, CPU-only PyTorch, wrong dataset paths and more). An Ultralytics run's page has **Train again with these settings**, and a stopped one that did not reach its last epoch also has **Resume**, which continues from `weights/last.pt` in the same folder with the Python that first ran it. On any run's page, **Main score** picks which logged value counts as the score, whether lower is better (loss, error rate), and a target that sends a phone alert when reached; the list, ranking and alerts follow it. **Compare** has a settings table for every run shown (only the settings that differ, next to each run's score, sortable by either, and included in the CSV), and for the runs you pick it shows only the settings that differ, warns when they used different data, filters by name or tag, and exports every run as a CSV. Under **Alerts** you can turn on phone alerts (ntfy, Slack, Discord or Telegram) without the Mac app. On the training PC they open unlocked when you start the page from the tray or setup. On another device they are locked until you paste the machine's token once (setup prints it with `--lan`, or run `py -m epokio agent --show-token`); the token stays in that browser. Train finds the Python environments on the machine (conda, python.org installs, project `.venv`s) and builds its settings from that environment's own Ultralytics.
234
+
235
+ **A terminal view.** On a server over SSH:
236
+
237
+ ```bash
238
+ epokio watch # reads the agent on this machine, or the current folder
239
+ epokio watch --root runs/ # no agent needed: read a folder directly
240
+ epokio watch --agent http://gpu-pc:8787 # watch another machine
241
+ ```
242
+
243
+ Arrow keys to pick a run, Enter for scores, curves and notes, Tab to switch loss and scores, q to quit.
244
+
245
+ **A system tray icon on Windows and Linux.** `pip install "epokio[tray]"`, then `epokio tray`. The same learning-curve icon fills with progress, the tooltip shows what you pick (progress, time left, finish time, epoch, best score, GPU), and the menu lists runs and opens the dashboard. It starts the agent for you.
246
+
247
+ **Phone push.** Add an [ntfy](https://ntfy.sh) address such as `https://ntfy.sh/your-secret-topic` as a webhook (Settings, Notifications) and install the free ntfy app. The training machine pushes to your phone directly, even when your Mac is off. You can also run your own ntfy server.
248
+
249
+ ## Use with AI assistants (MCP)
250
+
251
+ Epokio ships an MCP server, so Claude, ChatGPT or any MCP client can read your runs and queue jobs.
252
+
253
+ ```bash
254
+ pip install "epokio[mcp]"
255
+ claude mcp add epokio -- epokio-mcp
256
+ ```
257
+
258
+ Then ask things like *"How did last night's training go?"* or *"Auto-label this folder with my best model."*
259
+
260
+ | Look | Do (your assistant asks you first) |
261
+ |---|---|
262
+ | `list_runs`, `analyze_run`, `system_status`, `queue_status`, `job_log`, `python_envs`, `check_filenames` | `start_training`, `auto_label`, `cancel_job`, `export_report` |
263
+
264
+ ## Commands in plain words (optional)
265
+
266
+ Turn on **Settings → Assistant** and type what you want in the menu bar: *"retrain coco8 for 100 epochs"*, *"compare coco8 and defect_det"*, *"show me how the bert run did"*. Epokio shows what it understood and waits for you to confirm. It uses [TypeSafe](https://typesafe.ai) Jev with your own API key. Only the sentence and your run names are sent, never data, images, scores or paths. Off by default.
267
+
268
+ ## Supported frameworks
269
+
270
+ Epokio reads the files your framework already writes. No logging code to add.
271
+
272
+ | Framework | What it reads | Watch, results, compare | Start runs | Auto-label, review |
273
+ |---|---|---|---|---|
274
+ | Ultralytics YOLO | `results.csv`, `args.yaml` | ✅ | ✅ | ✅ |
275
+ | Hugging Face Trainer | `trainer_state.json` (also inside `checkpoint-*`) | ✅ | script | |
276
+ | PyTorch Lightning | `CSVLogger` `metrics.csv`, `hparams.yaml` | ✅ | script | |
277
+ | Keras | `CSVLogger` file (`training.log`, `history.csv`) | ✅ | script | |
278
+ | TensorBoard logs | `events.out.tfevents.*` scalars (Lightning's default logger, Hugging Face `runs/`), read without TensorFlow | ✅ | script | |
279
+
280
+ Adding another framework is one small adapter class in `src/epokio/adapters.py`.
281
+
282
+ ## How it compares
283
+
284
+ | | Epokio | Cloud trackers (W&B, Comet) | Self-hosted trackers (MLflow, ClearML, Aim) | Ultralytics Platform |
285
+ |---|---|---|---|---|
286
+ | Code changes in your training script | **None** | Add logging calls | Add logging calls | Train on their platform |
287
+ | Account or server | **None** | Account | Your own server | Account |
288
+ | Where your data goes | **Stays on your machines** | Their cloud | Your server | Their cloud |
289
+ | Always visible | **Menu bar, terminal, web page** | Browser tab, phone app | Browser tab | Browser tab |
290
+ | Runs you started last week | **Shown right away** | Only if they were logged | Only if they were logged | Only if trained there |
291
+ | Team dashboards, sweeps at scale, cloud GPUs | Basic sweeps only | Yes | Yes | Yes (cloud GPUs) |
292
+
293
+ Epokio is not trying to replace a team experiment tracker. It is the thing you glance at while training runs on your own Mac or GPU box, with results you can act on right away.
294
+
295
+ ## When something is off
296
+
297
+ * `epokio doctor` prints what Epokio sees: its version, whether the helper is running (and which version),
298
+ the folders it watches, the Python environments it found and the last lines of its log. It never prints
299
+ the token, so you can paste the output into a bug report (`--json` for the raw data).
300
+ * The helper writes `~/.epokio/agent.log` (1 MB, one old copy kept), with the reason behind any error.
301
+ * After upgrading, run `epokio setup` again: it restarts a helper that is still running the old version.
302
+ `epokio agent --stop` stops the helper on this machine.
303
+
304
+ ## Privacy
305
+
306
+ Epokio does not send your data anywhere. The app talks only to agents you run.
307
+ Optional webhooks (Slack, Discord, Telegram) send a one-line message when a run finishes, and only
308
+ if you add them.
309
+
310
+ ## Status
311
+
312
+ Early and moving fast. Things that work today are listed above, and [CHANGELOG.md](CHANGELOG.md) lists
313
+ what changed in each version. Bug reports and ideas are welcome as issues.
314
+
315
+ The app and the web page speak English and Korean. The app follows your Mac's language (or pick one in Settings → General); the web page follows your browser, with a language button at the top. More languages are on the way as machine drafts, and corrections will be very welcome as issues.
316
+
317
+ License: [MIT](LICENSE).
318
+
319
+ ---
320
+
321
+ ## 한국어
322
+
323
+ **Epokio**는 학습 진행 상황을 맥 메뉴바에서 바로 보는 앱입니다. 브라우저를 열 필요도, 학습 코드를 고칠 필요도 없습니다.
324
+
325
+ * **메뉴바**: 모든 학습의 진행률, 남은 시간, 최고 점수. GPU·CPU·메모리. 끝나거나 실패하거나 멈추면 알림
326
+ * **Studio 창**: 초보자는 `data.yaml`을 끌어다 놓고 시작 버튼만 누르면 됩니다. 전문가는 ultralytics 설정 전부를 설명과 함께 볼 수 있습니다
327
+ * **대기열**: 한 번에 하나씩, 껐다 켜도 이어집니다
328
+ * **오토라벨링**: 결과는 `labels_auto/`에 따로 씁니다. 기존 라벨을 덮어쓰지 않습니다
329
+ * **보고서**: 리더보드, Box·Pose별 P·R·F1·mAP, 자동 해설
330
+ * **원격 GPU**: 윈도우 학습 PC에서 `epokio setup --lan`(자동 시작·토큰 안내까지), 맥에서 확인. 보기만 하는 요청은 토큰 없이 되고, 무언가를 실행하거나 감시 폴더 밖을 읽는 요청은 토큰이 있어야 받습니다
331
+ * **맥↔윈도우 한글 파일명**: NFD·NFC가 달라도 같은 파일로 찾아갑니다
332
+
333
+ 설치: [릴리스](https://github.com/8rulerstar/epokio/releases/latest)에서 `.dmg`를 받아 응용 프로그램 폴더로 끌어다 놓고 열면 끝입니다. 도우미(agent)가 앱 안에 들어 있어 맥에서는 `pip install`이 필요 없습니다.
334
+ 윈도우는 같은 곳의 `Epokio.exe`를 받아 두 번 누르면 됩니다(보기만 할 때는 파이썬이 필요 없습니다).
335
+
336
+ ### 맥이 없어도 되는 것
337
+
338
+ 맥 앱은 보는 방법 중 하나입니다. 학습 기계에 agent만 깔면 맥 없이도 이만큼 됩니다.
339
+
340
+ | | 맥 앱 | 웹 화면 · 트레이 · 터미널 |
341
+ |---|---|---|
342
+ | 진행률·남은 시간·최고 점수 | 있음 | **있음** |
343
+ | 성적·곡선·자동 해설·결과 그림 | 있음 | **있음** (웹) |
344
+ | 학습 비교 | 있음 | **있음** (웹) |
345
+ | 끝났을 때 알림 | 맥 알림 | **폰 푸시**(ntfy·Slack·Discord·텔레그램), 윈도우·리눅스 트레이 알림 |
346
+ | GPU·CPU·메모리 | 있음 | **있음** |
347
+ | 학습 시작·대기열 | 있음 | **있음** (웹, 기계 토큰을 한 번 붙여 넣으면). 파이썬 자동 설치(NVIDIA면 CUDA), 출발 전 데이터 점검, 실패 원인·고칠 방법, 남은 시간, 다시 학습 |
348
+ | 검수·오토라벨링·라벨 보기 | 있음 | 없음 (맥 앱 전용) |
349
+
350
+ ```bash
351
+ pip install "epokio[tray]"
352
+ epokio setup --autostart
353
+ ```
354
+
355
+ `epokio setup` 한 줄이면 됩니다. 학습 폴더를 알아서 찾고, 도우미를 **검은 창 없이** 띄우고,
356
+ 브라우저를 열어 줍니다. `--autostart`를 붙이면 로그인할 때 트레이가 다시 뜹니다
357
+ (끄려면 `epokio autostart --off`, 또는 트레이 메뉴의 *Start when I log in*).
358
+ 시작프로그램 폴더의 평범한 바로 가기라서 탐색기에서 직접 지워도 됩니다.
359
+ 경로를 칠 일도, 플래그를 외울 일도 없습니다. 몇 번을 다시 돌려도 안전합니다.
360
+
361
+ 맥에서 이 기계를 보려면 `--lan`을 더하세요. 그때 토큰이 같이 출력됩니다.
362
+ TLS가 없으니 집·회사 안쪽 네트워크에서만 쓰세요. `--label 실습-07`로 이 PC가 보일 이름을 정할 수 있습니다
363
+ (여러 대를 한꺼번에 볼 때). SSH로 들어온 서버에서는 브라우저 대신 `ssh -L` 터널 명령을 알려 줍니다.
364
+
365
+ 웹 화면은 브라우저 언어를 따라 한국어로 나오고, 위쪽 버튼으로 바꿀 수 있습니다.
366
+ 도우미는 IP 주소, `localhost`, 이 PC 이름으로 시작하는 주소(`pc.lan`, Tailscale 이름 등)로 접속하면 답합니다.
367
+ 그 밖의 이름으로 쓰려면 이 PC에 `EPOKIO_ALLOWED_HOSTS=이름1,이름2`를 설정하세요(악성 웹페이지의 DNS 리바인딩 막기).
368
+
369
+ ```bash
370
+ epokio tray # 트레이 아이콘만 따로
371
+ epokio watch # 터미널에서 보기
372
+ ```
373
+
374
+ agent는 외부 패키지를 안 씁니다. 학습용 파이썬을 건드리는 게 걱정되면 **별도 가상환경에 깔아도**
375
+ 똑같이 동작합니다. 다른 기계에서 보려면 `--host 0.0.0.0`을 더하고, 그때는 토큰이 필요합니다
376
+ (`epokio-agent --show-token`). TLS가 없으니 집·회사 안쪽 네트워크에서만 쓰세요.
@@ -0,0 +1,48 @@
1
+ [project]
2
+ name = "epokio"
3
+ dynamic = ["version"] # src/epokio/__init__.py 의 __version__
4
+ readme = { file = "PYPI.md", content-type = "text/markdown" } # README는 그림이 상대 경로라 PyPI에서 깨진다
5
+ description = "Watch, compare, queue and report ML training runs (Ultralytics, Hugging Face, Lightning, Keras, TensorBoard) from a menu bar, tray, terminal or web page."
6
+ authors = [{ name = "8rulerstar" }]
7
+ keywords = ["machine learning", "training", "monitoring", "ultralytics", "yolo", "tensorboard", "experiment tracking"]
8
+ classifiers = [
9
+ "Development Status :: 4 - Beta",
10
+ "Environment :: Web Environment",
11
+ "Intended Audience :: Science/Research",
12
+ "Operating System :: OS Independent",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.10",
15
+ "Programming Language :: Python :: 3.14",
16
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
17
+ "Topic :: System :: Monitoring",
18
+ ]
19
+ requires-python = ">=3.10"
20
+ license = "MIT"
21
+ dependencies = ["windows-curses; sys_platform == 'win32'"] # 윈도우 파이썬에는 curses가 없다(epokio watch)
22
+
23
+ [project.optional-dependencies]
24
+ tray = ["pystray>=0.19", "Pillow>=10.0"] # 윈도우·리눅스 트레이
25
+ mcp = ["mcp>=2.2"] # AI 도우미 연동 (epokio-mcp)
26
+
27
+ [project.scripts]
28
+ epokio = "epokio.cli:main"
29
+ epokio-tray = "epokio.tray:main"
30
+ epokio-setup = "epokio.onboard:main" # 시작 메뉴 바로 가기로 부르기 좋게
31
+ epokio-agent = "epokio.agent:main"
32
+ epokio-mcp = "epokio.mcp_server:main"
33
+
34
+ [build-system]
35
+ requires = ["setuptools>=68"]
36
+ build-backend = "setuptools.build_meta"
37
+
38
+ [tool.setuptools.dynamic]
39
+ version = { attr = "epokio.__version__" }
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+
44
+ [tool.setuptools.package-data]
45
+ epokio = ["web/*.html"]
46
+
47
+ [tool.pytest.ini_options]
48
+ pythonpath = ["src"] # 막 클론한 사람이 설치 없이 pytest 를 바로 돌릴 수 있게
epokio-0.3.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,39 @@
1
+ """Epokio agent. 예전 이름은 TrainBar였다."""
2
+ from __future__ import annotations
3
+
4
+ from pathlib import Path
5
+
6
+ # 판 번호는 여기 한 곳(pyproject가 이것을 읽는다). ★설치 정보로 읽어, 맥 앱(PYTHONPATH로 소스를 돌린다)과
7
+ # exe에서는 'unknown'이거나 따로 깔린 다른 epokio의 판이 나왔다
8
+ __version__ = "0.3.0"
9
+
10
+
11
+ def _migrate_home() -> None:
12
+ """옛 데이터 폴더 ~/.trainbar 를 ~/.epokio 로 한 번 옮긴다(새 폴더가 없을 때만).
13
+ 기록 파일 안의 옛 경로도 새 경로로 고친다(대기열 결과 폴더, 알림함의 학습 위치)."""
14
+ old, new = Path.home() / ".trainbar", Path.home() / ".epokio"
15
+ if not old.is_dir() or new.exists():
16
+ return
17
+ try:
18
+ old.rename(new)
19
+ for f in new.glob("*.json"):
20
+ text = f.read_text(encoding="utf-8")
21
+ if "/.trainbar/" in text or "\\\\.trainbar\\\\" in text:
22
+ f.write_text(text.replace("/.trainbar/", "/.epokio/").replace("\\\\.trainbar\\\\", "\\\\.epokio\\\\"),
23
+ encoding="utf-8")
24
+ except OSError:
25
+ pass # 옮기지 못하면 새로 시작한다. 옛 폴더는 그대로 남는다
26
+
27
+
28
+ _migrate_home()
29
+
30
+
31
+ def version() -> str:
32
+ """이 코드의 판(맥 앱 판 build_app.sh와 같은 숫자로 맞춘다)"""
33
+ return __version__
34
+
35
+
36
+ def start(folder, epochs=None, **params):
37
+ """직접 짠 학습 코드용 기록기: `run = epokio.start("runs/exp", epochs=50, lr=1e-4)` 후 `run.log(val_loss=..., acc=...)`"""
38
+ from .logger import start as _start
39
+ return _start(folder, epochs, **params)
@@ -0,0 +1,4 @@
1
+ """`python -m epokio setup` 처럼 쓴다. ★pip의 Scripts 폴더가 PATH에 없는 윈도우에서는 `epokio`가 '인식되지 않는 명령'이었다"""
2
+ from .cli import main
3
+
4
+ main()