feat(presets): native named autotune/overclock presets (SupportsPresets)#291
feat(presets): native named autotune/overclock presets (SupportsPresets)#291pos-ei-don wants to merge 2 commits into
Conversation
|
I like the idea, very close in concept to what I think the ideal setup is. My only change would be to move the setter into Then you can keep With this method, the flow becomes:
The one thing we might want to pursue further is integrating more information about what TYPES of tuning target the miner supports, EG |
|
That's a clean fit — thanks. I'll rework it along those lines:
So the flow becomes exactly |
| pub pretty: Option<String>, | ||
| /// Tuning status (e.g. `"tuned"` / `"untuned"`), if provided. | ||
| pub status: Option<String>, | ||
| } |
There was a problem hiding this comment.
Can you add wattage: Option<Power> and hashrate: Option<HashRate>, following the precedent set on luxos, here - https://docs.luxor.tech/firmware/api/luxminer/profiles
|
Could you implement this for luxos as well, following their docs here https://docs.luxor.tech/firmware/api/luxminer/profiles |
|
On the VNish side I'll do the rework as discussed — move the setter into For luxos, though — I don't have any Luxminer hardware, and everything I've contributed so far I've verified live against my own miners. I'd rather not ship a luxos backend I can't actually run and test. Happy to keep the trait shape clean so someone with a Luxminer can add it as a follow-up, but I don't want to push code blind. Hope that's fair. |
5922155 to
f1f77d8
Compare
|
Pushed the rework (
Other backends get a (luxos still out of scope for me, as noted above — no Luxminer hardware to verify against.) |
5848df1 to
3d59af2
Compare
…s + set_tuning_config) Per review: selecting a preset goes through SetTuningConfig (new TuningTarget::Preset(name) variant) and the active preset is surfaced via GetTuningTarget; SupportsPresets keeps only get_presets + supports_presets. - core: TuningTarget::Preset(String) across enum, PyTuningTarget mirror, pydantic schema/from/to, TuningConfig (variant/target_preset/preset ctor) - SupportsPresets trait: drop get_current_preset + set_preset - vnish: parse_tuning_target -> Preset (from /settings overclock.preset); set_tuning_config handles Preset (set overclock.preset) and Power (delegates to set_power_limit) - other backends: Preset arm in exhaustive tuning matches (unsupported -> bail) - python: drop set_preset/get_current_preset bindings; TuningTarget.preset + TuningConfig.preset exposed; .pyi updated
3431624 to
db55120
Compare
Third one — and this is the one with the design question I mentioned, so very much up for discussion.
VNish exposes named autotune presets (e.g.
"5560"→"5560 watt ~ 175 TH", tuned/untuned), and the use case is letting a user pick one by name and see the tuned-hashrate label, rather than only targeting a wattage.set_power_limitalready picks the closest preset internally, but it never surfaces the list / current name / apply-by-name that a preset picker needs.This PR adds:
SupportsPresetstrait:get_presets() -> Vec<PresetInfo>,get_current_preset() -> Option<String>,set_preset(name) -> Result<bool>,supports_presets()(defaultfalse), in theMinersupertrait.PresetInfo { name, pretty: Option<String>, status: Option<String> }— read-onlypyclass./autotune/presets(list) and/settingsminer.overclock.preset(current + select)..pyi; trivial default impls for the other backends.Design question for you: I modeled this as named presets because that's VNish's native concept, but I know it sits a bit outside the abstract
TuningTarget(power/hashrate/mode) model you prefer. If you'd rather express "select preset X" as aTuningTargetvariant (amode/profile name?) and surface the resulting power viascaled_tuning_target— same family as the throttle discussion in #289 — I'm glad to reshape it that way. Tell me which direction fits, and I'll rework it.CI is green (
cargo test --all+ Python tests).