matcha-gpu 0.1.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.
- matcha_gpu-0.1.0/LICENSE +18 -0
- matcha_gpu-0.1.0/PKG-INFO +124 -0
- matcha_gpu-0.1.0/README.md +99 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/PKG-INFO +124 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/SOURCES.txt +9 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/dependency_links.txt +1 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/entry_points.txt +2 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/requires.txt +1 -0
- matcha_gpu-0.1.0/matcha_gpu.egg-info/top_level.txt +1 -0
- matcha_gpu-0.1.0/pyproject.toml +38 -0
- matcha_gpu-0.1.0/setup.cfg +4 -0
matcha_gpu-0.1.0/LICENSE
ADDED
|
@@ -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,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,99 @@
|
|
|
1
|
+
# ⚡ matcha
|
|
2
|
+
|
|
3
|
+
GPU energy metering for AI training workloads. Pure Python. No dashboards.
|
|
4
|
+
|
|
5
|
+
Polls GPU power at 100ms via NVML and reports energy consumption per training step.
|
|
6
|
+
|
|
7
|
+
Built by [Keeya Labs](https://keeyalabs.com).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install matcha-gpu
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires an NVIDIA GPU with drivers installed (`nvidia-smi` must work).
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### Option A: Wrap any training script (zero code changes)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
matcha wrap python train_gpt.py
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Matcha parses your script's stdout for step markers (`step 10`, `iter 10`, `[10/1000]`, etc.)
|
|
26
|
+
and reports energy between each step.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# also print the training script's output
|
|
30
|
+
matcha wrap -p python train_gpt.py
|
|
31
|
+
|
|
32
|
+
# custom gpu and sampling interval
|
|
33
|
+
matcha wrap --gpu 1 --interval 50 python train_gpt.py
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Option B: SDK (3 lines added to your training loop)
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import matcha
|
|
40
|
+
|
|
41
|
+
m = matcha.init()
|
|
42
|
+
|
|
43
|
+
for step in range(num_steps):
|
|
44
|
+
m.step_start()
|
|
45
|
+
|
|
46
|
+
# ... your training code, unchanged ...
|
|
47
|
+
|
|
48
|
+
energy = m.step_end(step)
|
|
49
|
+
# energy.energy_j — joules
|
|
50
|
+
# energy.avg_power_w — average watts during step
|
|
51
|
+
# energy.peak_power_w
|
|
52
|
+
|
|
53
|
+
summary = m.finish()
|
|
54
|
+
# summary.total_energy_j
|
|
55
|
+
# summary.energy_kwh
|
|
56
|
+
# summary.j_per_step
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Monitor GPU power (no training script)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
matcha monitor
|
|
63
|
+
matcha monitor --gpu 0 --window 2.0
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
⚡ matcha — gpu energy metering
|
|
70
|
+
────────────────────────────────────────────────────────
|
|
71
|
+
gpu NVIDIA H100 80GB HBM3
|
|
72
|
+
tdp 700W
|
|
73
|
+
sampling every 100ms
|
|
74
|
+
────────────────────────────────────────────────────────
|
|
75
|
+
|
|
76
|
+
step energy time avg W peak W power
|
|
77
|
+
────────────────────────────────────────────────────────
|
|
78
|
+
0 12.45 J 0.198s 62.8W 71.2W ██████░░░░░░
|
|
79
|
+
1 13.01 J 0.201s 64.7W 73.1W ██████░░░░░░
|
|
80
|
+
2 12.88 J 0.199s 64.7W 72.4W ██████░░░░░░
|
|
81
|
+
|
|
82
|
+
────────────────────────────────────────────────────────
|
|
83
|
+
⚡ session summary
|
|
84
|
+
────────────────────────────────────────────────────────
|
|
85
|
+
|
|
86
|
+
gpu NVIDIA H100 80GB HBM3
|
|
87
|
+
total energy 623.45 J
|
|
88
|
+
total time 10.02s
|
|
89
|
+
steps 50
|
|
90
|
+
energy/step 12.47 J
|
|
91
|
+
avg power 62.2W
|
|
92
|
+
peak power 73.1W
|
|
93
|
+
|
|
94
|
+
est. cost $0.000021 @ $0.12/kWh
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|
|
@@ -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 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pynvml>=11.5.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "matcha-gpu"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "GPU energy metering for AI training workloads"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {text = "Apache-2.0"}
|
|
12
|
+
authors = [{name = "Keeya Labs", email = "hello@keeyalabs.com"}]
|
|
13
|
+
keywords = ["gpu", "energy", "power", "training", "nvml", "observability"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Intended Audience :: Science/Research",
|
|
18
|
+
"Topic :: System :: Monitoring",
|
|
19
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.9",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"pynvml>=11.5.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://usematcha.dev"
|
|
32
|
+
Repository = "https://github.com/keeyalabs/matcha-gpu"
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
matcha = "matcha.cli:main"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
include = ["matcha*"]
|