Commit df57ee9
Fix mlnet performance benchmark timeouts by pre-provisioning the SSWE model into the Helix payload (#5250)
* Pre-provision ML.NET SSWE model into Helix payload to fix mlnet timeouts
The mlnet performance benchmarks (StochasticDualCoordinateAscentClassifierBench.TrainSentiment) apply a pretrained SSWE word embedding that ML.NET downloads (~70 MB) from aka.ms/mlnet-resources at benchmark runtime. That download stalls on the Helix machines, hanging the entire mlnet work item until it times out and is killed, discarding all mlnet results so every mlnet benchmark appears to fail.
Download the model on the build agent (reliable connectivity) into the correlation payload and point MICROSOFTML_RESOURCE_PATH at it via the Helix pre-commands, removing the runtime network dependency. Best-effort and strictly gated on run_kind == mlnet, so non-mlnet runs are unaffected and a download failure falls back to prior behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Tighten SSWE download validation and trim docstring
Download to a temp file, validate the size against Content-Length (when
present) and a minimum-size floor, then atomically replace the destination so
a truncated or early-closed response can't leave a corrupt sentiment.emd in
the payload. Also make the function docstring more concise.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Only enforce SSWE minimum-size floor when Content-Length is absent
When the server sends a Content-Length, an exact match fully validates the
download, so trust it regardless of size (the asset could legitimately shrink
without becoming invalid). Only fall back to the minimum-size floor when no
Content-Length is available.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Reduce SSWE download retries to 3 and timeout to 60s
Address review feedback: 5 retries and a 5-minute timeout are more than needed
for a ~70 MB download, so cap retries at 3 and the per-operation socket timeout
at 60s to avoid wasting build-agent time on a stuck download.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Validate SSWE model by SHA256 instead of size heuristics
Per review feedback, replace the Content-Length/minimum-size checks with an
exact SHA256 comparison against the known-good model hash. The SSWE model is a
fixed pretrained asset that shouldn't change, so a hash check definitively
rejects any truncated or corrupted download regardless of what headers the
server returns. If the asset is ever intentionally updated, the constant must
be recomputed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Quote MICROSOFTML_RESOURCE_PATH export and skip trailing retry sleep
Address review feedback: quote the non-Windows export value so a payload path
containing spaces or shell metacharacters isn't word-split (which would make
ML.NET miss the pre-provisioned model), and only sleep between download
attempts rather than after the final failed one.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Parker Bibus <parker.bibus@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8b1d923 commit df57ee9
1 file changed
Lines changed: 92 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
123 | 198 | | |
124 | 199 | | |
125 | 200 | | |
| |||
715 | 790 | | |
716 | 791 | | |
717 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
718 | 801 | | |
719 | 802 | | |
720 | 803 | | |
| |||
1037 | 1120 | | |
1038 | 1121 | | |
1039 | 1122 | | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1040 | 1132 | | |
1041 | 1133 | | |
1042 | 1134 | | |
| |||
0 commit comments