|
| 1 | +# ⚡️ ESPminer Optimizer |
| 2 | + |
| 3 | +Tweak your ESPminer for max hashrate, minimum watts, and thermally clean operation—automagically. |
| 4 | +Built for the modern sovereign miner, optimized for freedom. |
| 5 | + |
| 6 | +> “Don’t trust. Verify. Solo-mine. Then autotune.” — Satoshi, probably |
| 7 | +
|
| 8 | +--- |
| 9 | + |
| 10 | +## 🛠 What Is This? |
| 11 | + |
| 12 | +A CLI-based Python tuner that runs multi-objective optimization on your ESPminer. |
| 13 | +It finds the best balance of: |
| 14 | +- 🧠 **Hashrate** (TH/s) |
| 15 | +- 🔌 **Efficiency** (J/TH) |
| 16 | +- 🌡 **Thermal Constraints** |
| 17 | + |
| 18 | +All in real-time using [Optuna](https://optuna.org/) and your device’s REST API. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## 🚀 Features |
| 23 | + |
| 24 | +- 🎛 Optimizes frequency & core voltage |
| 25 | +- 🧪 Runs real-time stats collection from the ESPminer |
| 26 | +- 🧯 Aborts trials if temps go too high |
| 27 | +- 📈 Logs every trial to a CSV |
| 28 | +- 📚 Saves study results to a local SQLite DB |
| 29 | +- 🌈 Uses `rich` for pretty CLI output |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## ☠️ Warnings |
| 34 | + |
| 35 | +- This directly modifies your ESPminer settings and restarts the miner every trial. |
| 36 | +- Know your thermal + voltage limits. |
| 37 | + |
| 38 | +To enhance your ESPminer optimization workflow, consider integrating the Optuna Dashboard for real-time visualization and analysis of your optimization runs. This tool provides interactive graphs and detailed trial data, allowing you to monitor the optimization process effectively. |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## ⚙️ Requirements |
| 43 | + |
| 44 | +- Python 3 |
| 45 | +- A ESPminer running firmware with the `/api/system` endpoints |
| 46 | + |
| 47 | +Install dependencies: |
| 48 | +```bash |
| 49 | +pip install -r requirements.txt |
| 50 | +``` |
| 51 | + |
| 52 | +Required Python packages: |
| 53 | +``` |
| 54 | +optuna |
| 55 | +requests |
| 56 | +pandas |
| 57 | +rich |
| 58 | +``` |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +## 🧪 Running the Optimizer |
| 63 | + |
| 64 | +```bash |
| 65 | +python optimize.py |
| 66 | +``` |
| 67 | + |
| 68 | +You’ll be prompted for: |
| 69 | +- ESPminer IP address |
| 70 | +- Frequency & voltage range |
| 71 | +- Trial count & duration |
| 72 | +- Temperature limits |
| 73 | + |
| 74 | +Then the tuner gets to work—configuring, restarting, collecting stats, and evolving toward greatness. 🙌 |
| 75 | + |
| 76 | +Each trial logs: |
| 77 | +- Frequency (MHz) |
| 78 | +- Core Voltage (mV) |
| 79 | +- Avg Hashrate (TH/s) |
| 80 | +- Avg Power (W) |
| 81 | +- Efficiency (J/TH) |
| 82 | +- Objective Score |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +## 🛠️ Setting Up Optuna Dashboard |
| 87 | + |
| 88 | +1. **Install Optuna Dashboard**: |
| 89 | + |
| 90 | + ```bash |
| 91 | + pip install optuna-dashboard |
| 92 | + ``` |
| 93 | + |
| 94 | +2. **Run Your Optimization Script** |
| 95 | + |
| 96 | +3. **Launch the Dashboard**: |
| 97 | + |
| 98 | + In a separate terminal, start the dashboard: |
| 99 | + |
| 100 | + ```bash |
| 101 | + optuna-dashboard sqlite:///db.sqlite3 |
| 102 | + ``` |
| 103 | + |
| 104 | + This will start a local server, typically accessible at `http://localhost:8080/`. |
| 105 | + |
| 106 | +### 📊 Features of Optuna Dashboard |
| 107 | + |
| 108 | +- **Interactive Visualization** Monitor optimization history, parameter importances, and trial details through dynamic graph. |
| 109 | + |
| 110 | +- **Real-Time Updates** Observe the optimization progress as new trials are complete. |
| 111 | + |
| 112 | +- **Trial Management** Filter, sort, and inspect individual trials to gain insights into the optimization proces. |
| 113 | + |
| 114 | +For more information and advanced usage, refer to [Optuna Dashboard documentation](https://optuna-dashboard.readthedocs.io/). |
| 115 | +By incorporating the Optuna Dashboard into your workflow, you can gain deeper insights into your optimization process, leading to more efficient and effective tuning of your ESPminer device. |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +⚡️⛏️ Built for Bitaxe |
0 commit comments