matcha-gpu 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: matcha-gpu
3
+ Version: 0.1.0
4
+ Summary: GPU energy metering for AI training workloads
5
+ Author-email: Keeya Labs <hello@keeyalabs.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://usematcha.dev
8
+ Project-URL: Repository, https://github.com/keeyalabs/matcha-gpu
9
+ Keywords: gpu,energy,power,training,nvml,observability
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Topic :: System :: Monitoring
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pynvml>=11.5.0
24
+ Dynamic: license-file
25
+
26
+ # ⚡ matcha
27
+
28
+ GPU energy metering for AI training workloads. Pure Python. No dashboards.
29
+
30
+ Polls GPU power at 100ms via NVML and reports energy consumption per training step.
31
+
32
+ Built by [Keeya Labs](https://keeyalabs.com).
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ pip install matcha-gpu
38
+ ```
39
+
40
+ Requires an NVIDIA GPU with drivers installed (`nvidia-smi` must work).
41
+
42
+ ## Quick Start
43
+
44
+ ### Option A: Wrap any training script (zero code changes)
45
+
46
+ ```bash
47
+ matcha wrap python train_gpt.py
48
+ ```
49
+
50
+ Matcha parses your script's stdout for step markers (`step 10`, `iter 10`, `[10/1000]`, etc.)
51
+ and reports energy between each step.
52
+
53
+ ```bash
54
+ # also print the training script's output
55
+ matcha wrap -p python train_gpt.py
56
+
57
+ # custom gpu and sampling interval
58
+ matcha wrap --gpu 1 --interval 50 python train_gpt.py
59
+ ```
60
+
61
+ ### Option B: SDK (3 lines added to your training loop)
62
+
63
+ ```python
64
+ import matcha
65
+
66
+ m = matcha.init()
67
+
68
+ for step in range(num_steps):
69
+ m.step_start()
70
+
71
+ # ... your training code, unchanged ...
72
+
73
+ energy = m.step_end(step)
74
+ # energy.energy_j — joules
75
+ # energy.avg_power_w — average watts during step
76
+ # energy.peak_power_w
77
+
78
+ summary = m.finish()
79
+ # summary.total_energy_j
80
+ # summary.energy_kwh
81
+ # summary.j_per_step
82
+ ```
83
+
84
+ ### Monitor GPU power (no training script)
85
+
86
+ ```bash
87
+ matcha monitor
88
+ matcha monitor --gpu 0 --window 2.0
89
+ ```
90
+
91
+ ## Output
92
+
93
+ ```
94
+ ⚡ matcha — gpu energy metering
95
+ ────────────────────────────────────────────────────────
96
+ gpu NVIDIA H100 80GB HBM3
97
+ tdp 700W
98
+ sampling every 100ms
99
+ ────────────────────────────────────────────────────────
100
+
101
+ step energy time avg W peak W power
102
+ ────────────────────────────────────────────────────────
103
+ 0 12.45 J 0.198s 62.8W 71.2W ██████░░░░░░
104
+ 1 13.01 J 0.201s 64.7W 73.1W ██████░░░░░░
105
+ 2 12.88 J 0.199s 64.7W 72.4W ██████░░░░░░
106
+
107
+ ────────────────────────────────────────────────────────
108
+ ⚡ session summary
109
+ ────────────────────────────────────────────────────────
110
+
111
+ gpu NVIDIA H100 80GB HBM3
112
+ total energy 623.45 J
113
+ total time 10.02s
114
+ steps 50
115
+ energy/step 12.47 J
116
+ avg power 62.2W
117
+ peak power 73.1W
118
+
119
+ est. cost $0.000021 @ $0.12/kWh
120
+ ```
121
+
122
+ ## License
123
+
124
+ Apache 2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1,6 @@
1
+ matcha_gpu-0.1.0.dist-info/licenses/LICENSE,sha256=Ud0atzHUxxFVHRnqJsQ_f7MoqEsejSrB77RxZsIKvhg,740
2
+ matcha_gpu-0.1.0.dist-info/METADATA,sha256=JYnhDHeVksH-PUY1eJPduS8qsAv-h9zcVK6ksKrui3M,3902
3
+ matcha_gpu-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ matcha_gpu-0.1.0.dist-info/entry_points.txt,sha256=1jTqYR568M8Csf_ccS401C9LwbZY9LWmirZH4n_1Hy4,43
5
+ matcha_gpu-0.1.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ matcha_gpu-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ matcha = matcha.cli:main
@@ -0,0 +1,18 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ Copyright 2025 Keeya Labs
7
+
8
+ Licensed under the Apache License, Version 2.0 (the "License");
9
+ you may not use this file except in compliance with the License.
10
+ You may obtain a copy of the License at
11
+
12
+ http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ Unless required by applicable law or agreed to in writing, software
15
+ distributed under the License is distributed on an "AS IS" BASIS,
16
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and
18
+ limitations under the License.
@@ -0,0 +1 @@
1
+