A lightweight script for live `hy-smi` polling with rolling averages across multiple hosts. It features a modern terminal UI and can be used as a blocking scheduler for GPU jobs.
### Usage
Simple examples:
```bash
# Local node, all GPUs, 5-second rolling window
hytop gpu -n 1 --window 5
# Two nodes, monitor only GPU 0 and 1
hytop gpu -H node01,node02 --devices 0,1 -n 1
# Exit with code 0 when all monitored GPUs are available
hytop gpu --devices 0,1 --wait-idle
# Wait at most 300s for availability (exit 124 on timeout)
hytop gpu --devices 0,1 --wait-idle--timeout 300
```
Queue jobs in shared environments:
```bash
if hytop gpu -H node01,node02 --wait-idle--timeout 300;then
echo"GPUs available, starting workload..."
# YOUR COMMAND HERE (e.g., python train.py)
else
echo"Error: GPUs not available in time, aborting pipeline."
exit 1
fi
```
### Exit Codes
Designed to be script-friendly:
*`0`: Availability condition met (GPUs are idle).
*`124`: Timeout reached before the availability condition was met.
*`130`: Interrupted by the user (Ctrl+C).
*`2`: Argument or input error.
## Development
### Version bump
Version is sourced from `src/hytop/__init__.py` (`__version__`).