Commit 784b03e
authored
Add timing metadata for streaming
* Add timing metadata for streaming ParallelExecution responses
[ML-11879](https://iguazio.atlassian.net/browse/ML-11879)
Streaming responses from `ParallelExecution` were missing the when and `microsec` timing metadata that non-streaming responses include. This metadata is required for model monitoring in MLRun.
Changes
* Add `_StreamingResult` class to wrap streaming generators with timing info
* Set timing metadata on events before emitting streaming chunks
* Handle both in-process streaming (`_StreamingResult`) and process-based streaming (raw generators)
Notes
For streaming, `microsec` is set to `None` since total runtime isn't available until streaming completes
For process-based streaming, when uses the timestamp when chunks start arriving (timing from subprocess isn't available)
* Implement latency metadata in Collector
* Lint
* Remove code that handles unsupported multi-model stream result
* Add missing unit test for `StreamingError`ParallelExecution responses (#613)1 parent 404d886 commit 784b03e
3 files changed
+138
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1731 | 1745 | | |
1732 | 1746 | | |
1733 | 1747 | | |
| |||
1840 | 1854 | | |
1841 | 1855 | | |
1842 | 1856 | | |
1843 | | - | |
| 1857 | + | |
1844 | 1858 | | |
1845 | | - | |
| 1859 | + | |
1846 | 1860 | | |
1847 | 1861 | | |
1848 | 1862 | | |
| |||
1858 | 1872 | | |
1859 | 1873 | | |
1860 | 1874 | | |
1861 | | - | |
| 1875 | + | |
1862 | 1876 | | |
1863 | | - | |
| 1877 | + | |
1864 | 1878 | | |
1865 | 1879 | | |
1866 | 1880 | | |
| |||
1902 | 1916 | | |
1903 | 1917 | | |
1904 | 1918 | | |
1905 | | - | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1906 | 1923 | | |
1907 | 1924 | | |
1908 | 1925 | | |
| |||
2291 | 2308 | | |
2292 | 2309 | | |
2293 | 2310 | | |
2294 | | - | |
2295 | | - | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
2296 | 2331 | | |
2297 | 2332 | | |
2298 | 2333 | | |
2299 | 2334 | | |
2300 | | - | |
| 2335 | + | |
2301 | 2336 | | |
2302 | | - | |
| 2337 | + | |
2303 | 2338 | | |
2304 | 2339 | | |
2305 | 2340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
49 | 75 | | |
50 | 76 | | |
51 | 77 | | |
| |||
73 | 99 | | |
74 | 100 | | |
75 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
76 | 106 | | |
77 | 107 | | |
78 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1087 | 1113 | | |
1088 | 1114 | | |
1089 | 1115 | | |
| |||
1338 | 1364 | | |
1339 | 1365 | | |
1340 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1341 | 1405 | | |
1342 | 1406 | | |
1343 | 1407 | | |
| |||
0 commit comments