https://github.com/rilltome/torcy
https://github.com/rilltome/torcy
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rilltome/torcy
- Owner: rillToMe
- License: mit
- Created: 2025-11-06T16:30:46.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-11-07T15:24:50.000Z (5 months ago)
- Last Synced: 2025-11-28T06:47:30.455Z (4 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง Torcy
**Aesthetic and smart PyTorch environment tester - because checking your setup shouldn't look boring.**
[](https://pypi.org/project/torcy)
[](https://www.python.org)
[](LICENSE)
[](#)
[](https://pytorch.org)
---
> โ ๏ธ **Note:** This library is not expected to receive frequent updates.
> It will only be updated when it becomes **incompatible or broken** with newer versions of PyTorch or Python.
> Torcy is designed to be stable, lightweight, and long-lasting. Once it works - it *just works*.
---
## โจ Overview
Torcy is a stylish and safe CLI & library tool to test your **PyTorch environment** in seconds.
It checks whether PyTorch is installed correctly, detects **CPU/GPU**, verifies CUDA support, and even runs a small benchmark - all with an aesthetic terminal output ๐ป๐ฅ
---
## ๐ Installation
```bash
pip install torcy
```
Or install from source:
```bash
git clone https://github.com/rillToMe/torcy.git
cd torcy
pip install .
```
---
## ๐ก Usage
Run directly in your terminal:
```bash
torcy
```
Example output:
```
๐ฅ Starting PyTorch Environment Test ๐ฅ
๐งฉ PyTorch version: 2.4.0+cpu
โ๏ธ Using CPU: 12th Gen Intel(R) Core(TM) i5-12450HX
๐ก You can install the GPU version with: torcy --install-gpu
๐ Random tensor on CPU:
tensor([[0.23, 0.58, 0.71],
[0.91, 0.64, 0.12],
[0.55, 0.41, 0.77]])
๐ง Running quick compute benchmark...
๐ Benchmarking... โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:05
โก Compute speed: 5.11245s
โ
Test completed successfully - ๐ง Smooth setup!
```
---
## ๐งฉ GPU Installation Helper
Got an NVIDIA GPU (like RTX 3050)?
Torcy can install the correct GPU-enabled PyTorch build automatically:
```bash
torcy --install-gpu
```
This uses the official CUDA 12.1 wheel from the PyTorch repository.
---
## ๐ Features
| Feature | Description |
|----------|-------------|
| ๐ **Smart Detection** | Detects PyTorch version, CUDA status, and hardware info |
| ๐ง **CPU/GPU Info** | Shows exact CPU model or GPU name |
| ๐ก **Auto-Suggestion** | Suggests commands to install GPU-enabled PyTorch |
| โ๏ธ **Benchmark Test** | Quick compute test using PyTorch matrix multiplication |
| ๐จ **Beautiful CLI** | Animated intro, colorized output with `rich` |
| ๐ **Dual-Use** | Works as both a CLI tool and Python module |
---
## ๐ง As a Python Module
```python
import torcy
torcy.test()
```
---
## โ๏ธ Dependencies
- Python 3.8+
- [PyTorch](https://pytorch.org/)
- [`rich`](https://pypi.org/project/rich/)
- [`py-cpuinfo`](https://pypi.org/project/py-cpuinfo/)
Install manually if missing:
```bash
pip install rich py-cpuinfo
```
---
## ๐งฉ Developer Mode
For local development (to test without reinstalling the wheel):
```bash
python -m torcy
```
---
---
## ๐งพ License
**MIT License ยฉ 2025 [DitDev](https://github.com/rillToMe)**
Feel free to fork, modify, and share!
๐ **Portfolio:** [ditdev.vercel.app](https://ditdev.vercel.app)
---
## ๐ฌ Fun Fact
Torcy was created just to make `torch.cuda.is_available()` look cooler ๐
If you love small tools with personality - welcome aboard.
---
**Torcy** - *beautiful, minimal, and brutally honest about your PyTorch setup.*