File size: 1,456 Bytes
83f1d7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## My TurboVision Miner (local workspace)

This folder is **your miner package** (code + weights) that will be uploaded to your Hugging Face model repo and deployed to Chutes.

### What you edit
- **`miner.py`**: your main engine (frame batch → boxes + keypoints)
- **`chute_config.yml`**: hardware + pip installs for your Chutes runtime
- **Model files**: put your weights/checkpoints in this folder too (e.g. `*.pt`, `*.onnx`, `*.safetensors`)

### The contract (must match)
Your `miner.py` must contain:
- `class Miner`
- `__init__(self, path_hf_repo: Path)` to load weights from this folder
- `predict_batch(self, batch_images, offset, n_keypoints) -> list[TVFrameResult]`

Each returned `TVFrameResult` must include:
- `frame_id: int`
- `boxes: list[{x1,y1,x2,y2,cls_id,conf}]`
- `keypoints: list[(x,y)]` of length `n_keypoints` (pad missing with `(0,0)`)

### Deploy (from the turbovision repo root)
1) Ensure `.env` has your keys:
   - `HUGGINGFACE_USERNAME`, `HUGGINGFACE_API_KEY`
   - `CHUTES_USERNAME`, `CHUTES_API_KEY`
   - (optional for on-chain) `BITTENSOR_WALLET_COLD`, `BITTENSOR_WALLET_HOT`

2) Upload + deploy + (optionally) commit on-chain:

```bash
cd /home/pudge/Desktop/Score/turbovision
source .venv/bin/activate
sv -vv push --model-path /home/pudge/Desktop/Score/turbovision/my_miner_repo
```

### First smoke test (after deploy)
Hit your Chutes `/health` and `/predict` endpoints (you’ll get the chute slug in deploy logs).