PC 1 Ember per-card job: the curve line cast an integer plus a string and threw (the 06:0x 5080 run's rows lost); string interpolation instead, and every card's stored curve printed at the start

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 06:06:24 +00:00
parent e3bd943e0d
commit f21fa4b940

View file

@ -30,6 +30,8 @@ Write-Output ('RESULT TUNE job_id=' + $jobId + ' card_match=' + $want)
$cards = @($s.mining.cards | Where-Object { $_.enabled -and ($_.vendor -eq 'nvidia' -or $_.vendor -eq 'amd') -and $_.name -notmatch 'Radeon\(TM\) Graphics' -and $_.name -match $want })
if ($cards.Count -eq 0) { Write-Output ('RESULT TUNE error=no enabled card matching ' + $want + ' in api/state (names: ' + (($s.mining.cards | ForEach-Object { $_.name }) -join ', ') + ')'); exit 1 }
Write-Output ('RESULT TUNE cards ' + (($cards | ForEach-Object { $_.key + ' (' + $_.name + ', ' + $_.vendor + ', sweep_state ' + $_.sweep_state + ', line "' + $_.tune_line + '")' }) -join ' | '))
# every card's stored curve from the last tune (the 06:0x UTC 5080 run's rows were lost to a cast fault in this script's curve line; the app keeps them)
foreach ($c0 in $s.mining.cards) { if ($c0.tune_curve -and $c0.tune_curve.Count -gt 0) { Write-Output ('RESULT TUNE stored-curve key=' + $c0.key + ' source=' + $c0.tune_source + ' line="' + $c0.tune_line + '" rows=' + (($c0.tune_curve | ForEach-Object { "$($_.clock_mhz)MHz/$($_.mem_mhz)mem/$($_.power_pct)pct/$($_.limit_w)W/$($_.watts)W/$($_.mhs)MHs/$($_.eff)MHW/$($_.mark)" }) -join ' | ')) } }
foreach ($c in $cards) { Write-Output ('RESULT TUNE before key=' + $c.key + ' power_w=' + $c.power_w + ' power_pct=' + $c.power_pct + ' clock_cap=' + $c.clock_cap_mhz + ' mhs=' + $c.mhs + ' line=' + $c.tune_line) }
# the climb on (NVIDIA cards; an AMD card has no clock knob and runs its ladder regardless)
if (-not (Post 'api/tune/goal' '{"goal":"balanced","climb":true}')) { Write-Output 'RESULT TUNE error=tune_goal_refused'; exit 1 }
@ -62,7 +64,7 @@ foreach ($c in $order) {
}
}
$st = State
if ($st) { $cc = $st.mining.cards | Where-Object { $_.key -eq $c.key } | Select-Object -First 1; if ($cc) { Write-Output ('RESULT TUNE after key=' + $c.key + ' power_w=' + $cc.power_w + ' power_pct=' + $cc.power_pct + ' clock_cap=' + $cc.clock_cap_mhz + ' line=' + $cc.tune_line + ' source=' + $cc.tune_source + ' note=' + $cc.sweep_note); if ($cc.tune_curve) { Write-Output ('RESULT TUNE curve key=' + $c.key + ' ' + (($cc.tune_curve | ForEach-Object { ($_.clock_mhz) + 'MHz/' + ($_.mem_mhz) + 'mem/' + ($_.power_pct) + '%:' + $_.mhs + 'MH/s ' + $_.watts + 'W ' + $_.eff + ' ' + $_.mark }) -join ' | ')) } } }
if ($st) { $cc = $st.mining.cards | Where-Object { $_.key -eq $c.key } | Select-Object -First 1; if ($cc) { Write-Output ('RESULT TUNE after key=' + $c.key + ' power_w=' + $cc.power_w + ' power_pct=' + $cc.power_pct + ' clock_cap=' + $cc.clock_cap_mhz + ' line=' + $cc.tune_line + ' source=' + $cc.tune_source + ' note=' + $cc.sweep_note); if ($cc.tune_curve) { Write-Output ('RESULT TUNE curve key=' + $c.key + ' ' + (($cc.tune_curve | ForEach-Object { "$($_.clock_mhz)MHz/$($_.mem_mhz)mem/$($_.power_pct)pct/$($_.limit_w)W/$($_.watts)W/$($_.mhs)MHs/$($_.eff)MHW/$($_.mark)" }) -join ' | ')) } } }
}
# the climb switch back to what it was
Post 'api/tune/goal' ('{"climb":' + $(if ($climbBefore) { 'true' } else { 'false' }) + '}') | Out-Null