Datasets:
File size: 28,991 Bytes
e8c001c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | -- mysql_006 database initialization: create tables + load seed data
-- Executed via: mysql -u root < init_db.sql
-- Fix: MySQL root default auth_socket blocks pymysql TCP connections,
-- switch to mysql_native_password so pymysql (Python) can connect.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root123';
FLUSH PRIVILEGES;
CREATE DATABASE IF NOT EXISTS internal_platform_db
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_unicode_ci;
USE internal_platform_db;
-- 1. Input table: dwm_gputj_platform_gpu_base_feature_agg_v2
-- Columns: dt, service_name, instance_uuid, agg_type, agg_time, pod_count,
-- dcgm_fi_dev_gpu_util_pod_avg, k8s_container_bs_rate_cpu_core_used_request_pod_avg,
-- k8s_container_rate_mem_working_set_request_pod_avg, k8s_dcgm_fi_dev_fb_util_pod_avg,
-- k8s_container_vgpu_gpu_util_pod_avg,
-- dcgm_fi_dev_gpu_util_pod_max, k8s_container_bs_rate_cpu_core_used_request_pod_max,
-- k8s_container_rate_mem_working_set_request_pod_max, k8s_dcgm_fi_dev_fb_util_pod_max,
-- k8s_container_vgpu_gpu_util_pod_max,
-- dcgm_fi_dev_gpu_util_model_sum,
-- nv_inference_count_model_avg, nv_inference_count_model_max,
-- nv_inference_request_duration_ms_model_avg, nv_inference_request_duration_ms_model_max,
-- nv_inference_queue_duration_ms_model_avg, nv_inference_queue_duration_ms_model_max,
-- num_queued_reqs_model_avg, num_queued_reqs_model_max,
-- nv_inference_request_success_model_avg, nv_inference_request_success_model_max,
-- nv_inference_request_failure_model_avg, nv_inference_request_failure_model_max,
-- nv_inference_request_duration_ms_perreq_avg, nv_inference_request_duration_ms_perreq_max,
-- nv_inference_queue_duration_ms_perreq_avg, nv_inference_queue_duration_ms_perreq_max,
-- nv_inference_request_duration_ms_perreq_p95, nv_inference_queue_duration_ms_perreq_p95,
-- nv_inference_count_pod_avg, nv_inference_count_pod_max,
-- is_elasticity, scene, replicas, task_priority_expect, gpu_res_expect,
-- scale_up_target_size, scale_down_target_size, scale_up_time_str, scale_down_time_str,
-- max_replicas, gpu_name, queue_name, project_name, wsid_tag,
-- scene_type, business_scene, service_scene, queue_module, compression_strategy,
-- host_gpu_num, host_num, avg_pod_count, namespace, trial_job_name,
-- stream_request_total_model_avg, stream_request_total_model_max,
-- stream_request_timeout_total_model_avg, stream_request_timeout_total_model_max,
-- stream_empty_output_total_model_avg, stream_empty_output_total_model_max,
-- stream_request_fail_total_model_avg, stream_request_fail_total_model_max,
-- stream_cost_time_ms_perreq_avg, stream_cost_time_ms_perreq_max,
-- stream_first_char_time_ms_perreq_avg, stream_first_char_time_ms_perreq_max,
-- pod_req_count_mean_abs_rate_of_change, pod_req_count_mean_abs_rate_accelerated_of_change,
-- pod_req_count_coefficient_of_variation, pod_req_count_stddev_value,
-- nv_inference_count_model_min, nv_inference_count_model_p50, nv_inference_count_model_p90,
-- nv_inference_count_model_max_minute, nv_inference_count_model_min_minute,
-- nv_inference_request_duration_ms_perreq_min, nv_inference_request_duration_ms_perreq_p50,
-- nv_inference_request_duration_ms_perreq_p90,
-- nv_inference_request_duration_ms_perreq_max_minute, nv_inference_request_duration_ms_perreq_min_minute,
-- request_count, request_failed_count, request_failed_rate_avg, request_failed_rate_max,
-- request_timeout_count, request_timeout_rate_avg, request_timeout_rate_max,
-- first_char_time_perreq_ms_avg, first_char_time_perreq_ms_max, first_char_time_perreq_ms_min,
-- output_token_rate_model_avg, output_token_rate_model_max,
-- token_interval_avg_model_avg, token_interval_avg_model_max,
-- infer_request_total_model_avg, infer_request_total_model_max,
-- infer_request_timeout_total_model_avg, infer_request_timeout_total_model_max,
-- infer_empty_output_total_model_avg, infer_empty_output_total_model_max,
-- infer_request_fail_total_model_avg, infer_request_fail_total_model_max,
-- infer_cost_time_ms_perreq_avg, infer_cost_time_ms_perreq_max,
-- infer_first_char_time_ms_perreq_avg, infer_first_char_time_ms_perreq_max
CREATE TABLE IF NOT EXISTS dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_006 (
dt VARCHAR(256),
service_name VARCHAR(256),
instance_uuid VARCHAR(256),
agg_type BIGINT,
agg_time VARCHAR(256),
pod_count BIGINT,
dcgm_fi_dev_gpu_util_pod_avg DOUBLE,
k8s_container_bs_rate_cpu_core_used_request_pod_avg DOUBLE,
k8s_container_rate_mem_working_set_request_pod_avg DOUBLE,
k8s_dcgm_fi_dev_fb_util_pod_avg DOUBLE,
k8s_container_vgpu_gpu_util_pod_avg DOUBLE,
dcgm_fi_dev_gpu_util_pod_max DOUBLE,
k8s_container_bs_rate_cpu_core_used_request_pod_max DOUBLE,
k8s_container_rate_mem_working_set_request_pod_max DOUBLE,
k8s_dcgm_fi_dev_fb_util_pod_max DOUBLE,
k8s_container_vgpu_gpu_util_pod_max DOUBLE,
dcgm_fi_dev_gpu_util_model_sum DOUBLE,
nv_inference_count_model_avg DOUBLE,
nv_inference_count_model_max DOUBLE,
nv_inference_request_duration_ms_model_avg DOUBLE,
nv_inference_request_duration_ms_model_max DOUBLE,
nv_inference_queue_duration_ms_model_avg DOUBLE,
nv_inference_queue_duration_ms_model_max DOUBLE,
num_queued_reqs_model_avg DOUBLE,
num_queued_reqs_model_max DOUBLE,
nv_inference_request_success_model_avg DOUBLE,
nv_inference_request_success_model_max DOUBLE,
nv_inference_request_failure_model_avg DOUBLE,
nv_inference_request_failure_model_max DOUBLE,
nv_inference_request_duration_ms_perreq_avg DOUBLE,
nv_inference_request_duration_ms_perreq_max DOUBLE,
nv_inference_queue_duration_ms_perreq_avg DOUBLE,
nv_inference_queue_duration_ms_perreq_max DOUBLE,
nv_inference_request_duration_ms_perreq_p95 DOUBLE,
nv_inference_queue_duration_ms_perreq_p95 DOUBLE,
nv_inference_count_pod_avg DOUBLE,
nv_inference_count_pod_max DOUBLE,
is_elasticity BIGINT,
scene VARCHAR(256),
replicas BIGINT,
task_priority_expect BIGINT,
gpu_res_expect DOUBLE,
scale_up_target_size BIGINT,
scale_down_target_size BIGINT,
scale_up_time_str VARCHAR(256),
scale_down_time_str VARCHAR(256),
max_replicas BIGINT,
gpu_name VARCHAR(256),
queue_name VARCHAR(256),
project_name VARCHAR(256),
wsid_tag VARCHAR(256),
scene_type VARCHAR(256),
business_scene VARCHAR(256),
service_scene VARCHAR(256),
queue_module VARCHAR(256),
compression_strategy VARCHAR(256),
host_gpu_num BIGINT,
host_num BIGINT,
avg_pod_count DOUBLE,
namespace VARCHAR(256),
trial_job_name VARCHAR(256),
stream_request_total_model_avg DOUBLE,
stream_request_total_model_max DOUBLE,
stream_request_timeout_total_model_avg DOUBLE,
stream_request_timeout_total_model_max DOUBLE,
stream_empty_output_total_model_avg DOUBLE,
stream_empty_output_total_model_max DOUBLE,
stream_request_fail_total_model_avg DOUBLE,
stream_request_fail_total_model_max DOUBLE,
stream_cost_time_ms_perreq_avg DOUBLE,
stream_cost_time_ms_perreq_max DOUBLE,
stream_first_char_time_ms_perreq_avg DOUBLE,
stream_first_char_time_ms_perreq_max DOUBLE,
pod_req_count_mean_abs_rate_of_change DOUBLE,
pod_req_count_mean_abs_rate_accelerated_of_change DOUBLE,
pod_req_count_coefficient_of_variation DOUBLE,
pod_req_count_stddev_value DOUBLE,
nv_inference_count_model_min DOUBLE,
nv_inference_count_model_p50 DOUBLE,
nv_inference_count_model_p90 DOUBLE,
nv_inference_count_model_max_minute BIGINT,
nv_inference_count_model_min_minute BIGINT,
nv_inference_request_duration_ms_perreq_min DOUBLE,
nv_inference_request_duration_ms_perreq_p50 DOUBLE,
nv_inference_request_duration_ms_perreq_p90 DOUBLE,
nv_inference_request_duration_ms_perreq_max_minute BIGINT,
nv_inference_request_duration_ms_perreq_min_minute BIGINT,
request_count DOUBLE,
request_failed_count DOUBLE,
request_failed_rate_avg DOUBLE,
request_failed_rate_max DOUBLE,
request_timeout_count DOUBLE,
request_timeout_rate_avg DOUBLE,
request_timeout_rate_max DOUBLE,
first_char_time_perreq_ms_avg DOUBLE,
first_char_time_perreq_ms_max DOUBLE,
first_char_time_perreq_ms_min DOUBLE,
output_token_rate_model_avg DOUBLE,
output_token_rate_model_max DOUBLE,
token_interval_avg_model_avg DOUBLE,
token_interval_avg_model_max DOUBLE,
infer_request_total_model_avg DOUBLE,
infer_request_total_model_max DOUBLE,
infer_request_timeout_total_model_avg DOUBLE,
infer_request_timeout_total_model_max DOUBLE,
infer_empty_output_total_model_avg DOUBLE,
infer_empty_output_total_model_max DOUBLE,
infer_request_fail_total_model_avg DOUBLE,
infer_request_fail_total_model_max DOUBLE,
infer_cost_time_ms_perreq_avg DOUBLE,
infer_cost_time_ms_perreq_max DOUBLE,
infer_first_char_time_ms_perreq_avg DOUBLE,
infer_first_char_time_ms_perreq_max DOUBLE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Helper: 88-column row template for feature table
-- (dt, service_name, instance_uuid, agg_type, agg_time, pod_count,
-- 5 pod_avg, 5 pod_max, 1 model_sum,
-- 2 inference_count, 2 req_duration_model, 2 queue_duration_model,
-- 2 queued_reqs, 2 req_success, 2 req_failure,
-- 2 duration_perreq, 2 queue_perreq, 2 perreq_p95,
-- 2 count_pod,
-- is_elasticity, scene, replicas, task_priority_expect, gpu_res_expect,
-- scale_up_target_size, scale_down_target_size, scale_up_time_str, scale_down_time_str,
-- max_replicas, gpu_name, queue_name, project_name, wsid_tag,
-- scene_type, business_scene, service_scene, queue_module, compression_strategy,
-- host_gpu_num, host_num, avg_pod_count, namespace, trial_job_name,
-- 12 stream_*, 4 pod_req_count_*, 3 nv_count_min/p50/p90, 2 max/min_minute,
-- 3 perreq_min/p50/p90, 2 perreq_max/min_minute,
-- 7 request_*, 3 first_char_*, 2 output_token_*, 2 token_interval_*,
-- 12 infer_*)
-- svc_alpha, agg_type=1: 6 rows (5 weekday + 1 holiday)
-- Holiday dates in history: 2026-04-27
-- Weekday dates: 2026-04-22, 2026-04-23, 2026-04-24, 2026-04-25, 2026-04-28
INSERT INTO dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_006 VALUES
-- svc_alpha agg_type=1 weekday rows (nv_inference_count_model_avg ascending for P90 ranking)
('20260429', 'svc_alpha', 'uuid-001', 1, '2026-04-22 10:00:00', 2,
40.0, 25.0, 35.0, 15.0, 45.0, 50.0, 30.0, 40.0, 20.0, 50.0, 80.0,
80.0, 100.0, 60.0, 80.0, 8.0, 12.0, 3.0, 5.0, 100.0, 120.0, 1.0, 2.0,
55.0, 75.0, 6.0, 10.0, 60.0, 7.0, 50.0, 70.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 70,80,90,8,3, 50,55,60,10,2, 400,3,0.005,0.02,1,0.002,0.005, 40,70,25, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260430', 'svc_alpha', 'uuid-001', 1, '2026-04-23 10:00:00', 2,
45.0, 27.0, 37.0, 17.0, 50.0, 55.0, 32.0, 42.0, 22.0, 55.0, 85.0,
90.0, 110.0, 65.0, 85.0, 9.0, 13.0, 4.0, 6.0, 105.0, 125.0, 1.5, 2.5,
60.0, 80.0, 7.0, 11.0, 65.0, 8.0, 55.0, 75.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 85,95,105,9,4, 55,60,65,11,3, 420,4,0.006,0.03,1.5,0.003,0.006, 45,75,27, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260501', 'svc_alpha', 'uuid-001', 1, '2026-04-24 10:00:00', 2,
50.0, 30.0, 40.0, 20.0, 55.0, 60.0, 35.0, 45.0, 25.0, 60.0, 100.0,
110.0, 130.0, 75.0, 95.0, 10.0, 14.0, 5.0, 7.0, 110.0, 130.0, 2.0, 3.0,
68.0, 88.0, 8.0, 12.0, 73.0, 9.0, 60.0, 80.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 100,110,120,10,5, 60,65,70,12,3, 450,4.5,0.008,0.04,2,0.004,0.008, 50,80,30, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260502', 'svc_alpha', 'uuid-001', 1, '2026-04-25 10:00:00', 2,
50.0, 30.0, 40.0, 20.0, 55.0, 60.0, 35.0, 45.0, 25.0, 60.0, 100.0,
120.5, 150.0, 80.0, 100.0, 10.0, 15.0, 5.0, 8.0, 110.0, 130.0, 2.0, 3.0,
70.0, 90.0, 8.0, 12.0, 75.0, 9.0, 60.0, 80.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 100,110,130,10,5, 60,65,72,12,3, 500,5,0.01,0.05,2,0.004,0.01, 50,80,30, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260506', 'svc_alpha', 'uuid-001', 1, '2026-04-28 10:00:00', 2,
55.0, 33.0, 43.0, 23.0, 60.0, 65.0, 38.0, 48.0, 28.0, 65.0, 110.0,
140.0, 170.0, 90.0, 110.0, 14.0, 18.0, 7.0, 10.0, 120.0, 140.0, 3.5, 4.5,
75.0, 95.0, 10.0, 14.0, 80.0, 11.0, 65.0, 85.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 130,140,160,12,7, 65,70,76,14,5, 550,6,0.012,0.06,3,0.006,0.012, 55,85,35, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- svc_alpha agg_type=1 holiday row (2026-04-27 is a holiday)
('20260504', 'svc_alpha', 'uuid-001', 1, '2026-04-27 10:00:00', 2,
52.0, 32.0, 42.0, 22.0, 57.0, 62.0, 37.0, 47.0, 27.0, 62.0, 105.0,
130.0, 160.0, 85.0, 105.0, 12.0, 17.0, 6.0, 9.0, 115.0, 135.0, 3.0, 4.0,
72.0, 92.0, 9.0, 13.0, 77.0, 10.0, 62.0, 82.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 120,130,150,11,6, 62,67,74,13,4, 520,6,0.012,0.06,3,0.005,0.012, 52,82,32, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- svc_alpha, agg_type=2: 4 rows (3 weekday + 1 holiday)
-- Weekday: 2026-04-22, 2026-04-24, 2026-04-28; Holiday: 2026-04-27
('20260429', 'svc_alpha', 'uuid-001', 2, '2026-04-22 11:00:00', 2,
38.0, 23.0, 33.0, 13.0, 43.0, 48.0, 28.0, 38.0, 18.0, 48.0, 75.0,
70.0, 90.0, 50.0, 70.0, 6.0, 10.0, 2.0, 4.0, 90.0, 110.0, 0.5, 1.5,
50.0, 70.0, 5.0, 9.0, 55.0, 6.0, 45.0, 65.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 60,70,80,7,2, 45,50,55,9,1, 350,2,0.004,0.015,0.5,0.001,0.004, 35,65,20, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260501', 'svc_alpha', 'uuid-001', 2, '2026-04-24 11:00:00', 2,
48.0, 28.0, 38.0, 18.0, 53.0, 58.0, 33.0, 43.0, 23.0, 58.0, 95.0,
100.0, 120.0, 70.0, 90.0, 8.0, 12.0, 4.0, 6.0, 105.0, 125.0, 1.5, 2.5,
65.0, 85.0, 7.0, 11.0, 70.0, 8.0, 55.0, 75.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 95,105,115,10,4, 58,63,68,11,2, 480,4,0.008,0.035,1.5,0.003,0.008, 48,78,28, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260506', 'svc_alpha', 'uuid-001', 2, '2026-04-28 11:00:00', 2,
52.0, 32.0, 42.0, 22.0, 57.0, 62.0, 37.0, 47.0, 27.0, 62.0, 105.0,
125.0, 155.0, 82.0, 102.0, 12.0, 16.0, 6.0, 9.0, 115.0, 135.0, 3.0, 4.0,
72.0, 92.0, 9.0, 13.0, 77.0, 10.0, 60.0, 80.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 120,130,150,12,6, 65,70,76,13,4, 530,5.5,0.011,0.055,2.5,0.005,0.011, 52,82,32, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- svc_alpha agg_type=2 holiday row
('20260504', 'svc_alpha', 'uuid-001', 2, '2026-04-27 11:00:00', 2,
48.0, 28.0, 38.0, 18.0, 53.0, 58.0, 33.0, 43.0, 23.0, 58.0, 98.0,
100.0, 140.0, 75.0, 95.0, 8.0, 13.0, 4.0, 7.0, 105.0, 125.0, 1.0, 2.0,
68.0, 88.0, 7.0, 11.0, 73.0, 8.0, 58.0, 78.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q1', 'proj1', 'wsid1', 'llm', 'bs1', 'ss1', 'qm1', 'none',
8, 1, 3.0, 'ns_test', 'wl_alpha',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 95,105,125,9,4, 58,63,70,11,2, 480,4,0.008,0.04,1,0.003,0.008, 48,78,28, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- svc_beta, agg_type=1: 3 rows (ALL weekday, NO holiday => triggers degradation for holiday predictions)
('20260430', 'svc_beta', 'uuid-002', 1, '2026-04-23 14:00:00', 1,
35.0, 20.0, 30.0, 10.0, 40.0, 45.0, 25.0, 35.0, 15.0, 45.0, 60.0,
60.0, 80.0, 45.0, 65.0, 5.0, 8.0, 2.0, 3.0, 85.0, 105.0, 0.5, 1.0,
45.0, 65.0, 4.0, 7.0, 50.0, 5.0, 40.0, 60.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 50,60,70,6,1, 40,45,50,8,1, 300,1.5,0.003,0.01,0.3,0.001,0.003, 30,60,15, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260501', 'svc_beta', 'uuid-002', 1, '2026-04-24 14:00:00', 1,
40.0, 25.0, 35.0, 15.0, 45.0, 50.0, 30.0, 40.0, 20.0, 50.0, 70.0,
80.0, 100.0, 55.0, 75.0, 7.0, 10.0, 3.0, 4.0, 95.0, 115.0, 0.8, 1.5,
50.0, 70.0, 5.0, 8.0, 55.0, 6.0, 45.0, 65.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 70,80,90,8,2, 45,50,55,9,2, 350,2,0.004,0.015,0.5,0.001,0.004, 35,65,20, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260506', 'svc_beta', 'uuid-002', 1, '2026-04-28 14:00:00', 1,
45.0, 28.0, 38.0, 18.0, 50.0, 55.0, 33.0, 43.0, 23.0, 55.0, 80.0,
100.0, 120.0, 65.0, 85.0, 9.0, 12.0, 4.0, 5.0, 105.0, 125.0, 1.2, 2.0,
55.0, 75.0, 6.0, 9.0, 60.0, 7.0, 50.0, 70.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 90,100,110,9,3, 50,55,60,10,3, 400,3,0.005,0.02,0.8,0.002,0.005, 40,70,25, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- svc_beta, agg_type=2: 3 rows (ALL weekday, NO holiday => triggers degradation for holiday predictions)
('20260429', 'svc_beta', 'uuid-002', 2, '2026-04-22 14:00:00', 1,
32.0, 18.0, 28.0, 10.0, 37.0, 42.0, 23.0, 33.0, 15.0, 42.0, 55.0,
55.0, 75.0, 40.0, 60.0, 4.0, 7.0, 1.5, 2.5, 80.0, 100.0, 0.3, 0.8,
42.0, 62.0, 3.5, 6.5, 47.0, 4.5, 37.0, 57.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 45,55,65,5,1, 35,40,45,7,1, 280,1,0.002,0.008,0.2,0.001,0.002, 25,55,10, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260502', 'svc_beta', 'uuid-002', 2, '2026-04-25 14:00:00', 1,
38.0, 23.0, 33.0, 13.0, 43.0, 48.0, 28.0, 38.0, 18.0, 48.0, 65.0,
75.0, 95.0, 50.0, 70.0, 6.0, 9.0, 2.5, 3.5, 90.0, 110.0, 0.6, 1.2,
48.0, 68.0, 4.5, 7.5, 52.0, 5.5, 42.0, 62.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 65,75,85,7,2, 42,47,52,9,2, 320,1.8,0.003,0.012,0.4,0.001,0.003, 32,62,17, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
('20260506', 'svc_beta', 'uuid-002', 2, '2026-04-28 14:00:00', 1,
42.0, 26.0, 36.0, 16.0, 48.0, 52.0, 31.0, 41.0, 21.0, 52.0, 75.0,
90.0, 110.0, 58.0, 78.0, 8.0, 11.0, 3.5, 4.5, 100.0, 120.0, 1.0, 1.8,
52.0, 72.0, 5.5, 8.5, 57.0, 6.5, 47.0, 67.0,
0, 'inference', 2, 1, 1.5, 3, 1, '09:00', '21:00', 8,
'V100', 'q2', 'proj2', 'wsid2', 'llm', 'bs2', 'ss2', 'qm2', 'none',
4, 1, 2.0, 'ns_prod', 'wl_beta',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 80,90,100,9,3, 48,53,58,10,3, 370,2.5,0.004,0.018,0.7,0.002,0.004, 38,68,22, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0);
-- ============================================================================
-- Coverage augmentation (诱饵 + 正例) for rules left UNCOVERED by 2-service seed.
-- svc_gamma: agg_type=1, time-part 16:00, history is HOLIDAY-ONLY (2026-04-27).
-- 正例 (R8d): weekday predictions have feature_weekday_total=0 (<1) => degrade to
-- feature_holiday_index branch. This is the only service that exercises that branch.
-- Correct CPD breakpoint = '2026-04-26 16:00:00' (lowest metric_value on latest dt).
-- All decoys below are scoped to svc_gamma / the empty-name service, so svc_alpha and
-- svc_beta output rows are completely untouched.
INSERT INTO dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_006 VALUES
-- 正例 G1: svc_gamma holiday history row (2026-04-27, post-breakpoint, the ONLY valid row)
('20260504', 'svc_gamma', 'uuid-003', 1, '2026-04-27 16:00:00', 2,
66.0, 44.0, 54.0, 34.0, 70.0, 70.0, 50.0, 60.0, 40.0, 75.0, 110.0,
200.0, 210.0, 95.0, 115.0, 15.0, 20.0, 8.0, 11.0, 130.0, 150.0, 5.0, 6.0,
85.0, 105.0, 12.0, 16.0, 90.0, 13.0, 70.0, 90.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q3', 'proj3', 'wsid3', 'llm', 'bs3', 'ss3', 'qm3', 'none',
8, 1, 3.0, 'ns_gamma', 'wl_gamma',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 180,190,200,12,7, 80,85,90,13,4, 600,7,0.012,0.06,3,0.005,0.012, 66,90,40, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- 诱饵 R7 (cpd inner dedup): pre-breakpoint weekday row (2026-04-20). Filtered by post-breakpoint
-- join when correct breakpoint (04-26) is picked; LEAKS if dedup flips ASC->DESC (breakpoint 04-15).
('20260422', 'svc_gamma', 'uuid-003', 1, '2026-04-20 16:00:00', 2,
60.0, 40.0, 50.0, 30.0, 65.0, 65.0, 45.0, 55.0, 35.0, 70.0, 100.0,
999.0, 1000.0, 90.0, 110.0, 14.0, 19.0, 7.0, 10.0, 125.0, 145.0, 4.0, 5.0,
80.0, 100.0, 11.0, 15.0, 85.0, 12.0, 65.0, 85.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q3', 'proj3', 'wsid3', 'llm', 'bs3', 'ss3', 'qm3', 'none',
8, 1, 3.0, 'ns_gamma', 'wl_gamma',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 180,190,200,12,7, 80,85,90,13,4, 600,7,0.012,0.06,3,0.005,0.012, 60,85,35, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- 诱饵 R1 (nv_inference_count_model_avg >= 0): negative-avg row (post-breakpoint, weekday).
-- Filtered by the >=0 rule; LEAKS into svc_gamma group if that filter is dropped.
('20260506', 'svc_gamma', 'uuid-003', 1, '2026-04-28 16:00:00', 2,
60.0, 40.0, 50.0, 30.0, 65.0, 65.0, 45.0, 55.0, 35.0, 70.0, 100.0,
-10.0, 0.0, 90.0, 110.0, 14.0, 19.0, 7.0, 10.0, 125.0, 145.0, 4.0, 5.0,
80.0, 100.0, 11.0, 15.0, 85.0, 12.0, 65.0, 85.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q3', 'proj3', 'wsid3', 'llm', 'bs3', 'ss3', 'qm3', 'none',
8, 1, 3.0, 'ns_gamma', 'wl_gamma',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 180,190,200,12,7, 80,85,90,13,4, 600,7,0.012,0.06,3,0.005,0.012, 60,85,35, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- 诱饵 R2 (agg_type IN (1,2)): agg_type=3 row in template window (creates a 16:00/type3 future
-- slot). Filtered out of the feature CTE; LEAKS as type-3 output rows if the agg_type filter widens.
('20260506', 'svc_gamma', 'uuid-003', 3, '2026-04-29 16:00:00', 2,
60.0, 40.0, 50.0, 30.0, 65.0, 65.0, 45.0, 55.0, 35.0, 70.0, 100.0,
50.0, 60.0, 90.0, 110.0, 14.0, 19.0, 7.0, 10.0, 125.0, 145.0, 4.0, 5.0,
80.0, 100.0, 11.0, 15.0, 85.0, 12.0, 65.0, 85.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q3', 'proj3', 'wsid3', 'llm', 'bs3', 'ss3', 'qm3', 'none',
8, 1, 3.0, 'ns_gamma', 'wl_gamma',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 180,190,200,12,7, 80,85,90,13,4, 600,7,0.012,0.06,3,0.005,0.012, 60,85,35, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0),
-- 诱饵 R4 (service name <> ''): empty-name service with a full valid history row.
-- Excluded from service_list by the name<>'' rule; LEAKS ~14 output rows if that filter is dropped.
('20260504', '', 'uuid-004', 1, '2026-04-27 16:00:00', 2,
60.0, 40.0, 50.0, 30.0, 65.0, 65.0, 45.0, 55.0, 35.0, 70.0, 100.0,
300.0, 310.0, 90.0, 110.0, 14.0, 19.0, 7.0, 10.0, 125.0, 145.0, 4.0, 5.0,
80.0, 100.0, 11.0, 15.0, 85.0, 12.0, 65.0, 85.0,
0, 'inference', 3, 1, 2.0, 5, 2, '08:00', '22:00', 10,
'A100', 'q4', 'proj4', 'wsid4', 'llm', 'bs4', 'ss4', 'qm4', 'none',
8, 1, 3.0, 'ns_empty', 'wl_empty',
0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0, 180,190,200,12,7, 80,85,90,13,4, 600,7,0.012,0.06,3,0.005,0.012, 60,85,35, 0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0);
-- 2. Input table: dwd_aide_inferencev2_done_service_info_h
CREATE TABLE IF NOT EXISTS dwd_aide_inferencev2_done_service_info_h_mysql_006 (
id VARCHAR(256),
name VARCHAR(256),
dt VARCHAR(256)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO dwd_aide_inferencev2_done_service_info_h_mysql_006 VALUES
('1', 'svc_alpha', '2026050723'),
('2', 'svc_beta', '2026050723'),
-- 正例: svc_gamma is an online service => must appear in service_list
('3', 'svc_gamma', '2026050723'),
-- 诱饵 R4 (name <> ''): empty-name service must be excluded from service_list
('4', '', '2026050723');
-- 3. Input table: dwd_gputj_platform_metric_cpd_offline_v2
-- CPD breakpoint dates must be VARCHAR matching the format 'YYYY-MM-DD HH:MM:SS'
-- to avoid implicit type conversion with feature.agg_time
CREATE TABLE IF NOT EXISTS dwd_gputj_platform_metric_cpd_offline_v2_mysql_006 (
dt VARCHAR(256),
service_name VARCHAR(256),
agg_time VARCHAR(256),
metric_name VARCHAR(256),
metric_value DOUBLE,
msg VARCHAR(256)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO dwd_gputj_platform_metric_cpd_offline_v2_mysql_006 VALUES
-- svc_alpha: two metric_names on same dt, lowest metric_value per metric wins,
-- then pick latest dt's agg_time -> picks 2026-04-24 10:00:00
('20260423', 'svc_alpha', '2026-04-23 10:00:00', 'cpd_metric', 0.9, 'success'),
('20260423', 'svc_alpha', '2026-04-23 10:00:00', 'cpd_metric2', 0.7, 'success'),
('20260424', 'svc_alpha', '2026-04-24 10:00:00', 'cpd_metric', 0.5, 'success'),
('20260424', 'svc_alpha', '2026-04-24 10:00:00', 'cpd_metric2', 0.6, 'success'),
-- svc_beta: single breakpoint at 2026-04-22
('20260422', 'svc_beta', '2026-04-22 14:00:00', 'cpd_metric', 0.4, 'success'),
-- svc_gamma: correct breakpoint = '2026-04-26 16:00:00'.
-- 诱饵 R7 (inner dedup ORDER BY metric_value ASC): same (svc_gamma, dt=20260426, cpd_metric)
-- appears twice. Lowest value (0.3 -> agg '2026-04-26') wins under ASC. If dedup flips to DESC,
-- the 0.9 row (agg '2026-04-29 16:00:00') wins => breakpoint moves past svc_gamma's only history
-- record (2026-04-27) => svc_gamma rows vanish => output diverges.
('20260426', 'svc_gamma', '2026-04-26 16:00:00', 'cpd_metric', 0.3, 'success'),
('20260426', 'svc_gamma', '2026-04-29 16:00:00', 'cpd_metric', 0.9, 'success'),
-- 诱饵 R3 (msg = 'success'): a non-success row at a LATER dt with the lowest value. If the
-- msg filter is dropped, this becomes the latest breakpoint (2026-04-30) and drops svc_gamma.
('20260430', 'svc_gamma', '2026-04-30 16:00:00', 'cpd_metric', 0.1, 'failed'),
-- 诱饵 R4 (service name <> ''): breakpoint for the empty-name service so that its feature row
-- survives the post-breakpoint join. The empty service is still excluded by name<>''; if that
-- filter is dropped, it leaks ~14 output rows.
('20260426', '', '2026-04-26 16:00:00', 'cpd_metric', 0.3, 'success');
-- 4. Input table: dim_holiday_list
-- Expanded holidays to cover consecutive holidays and more boundary cases
-- Future window: 2026-05-08 (holiday), 2026-05-09 (holiday) -> consecutive holidays
-- History window: 2026-04-27 (holiday) -> only historical holiday
CREATE TABLE IF NOT EXISTS dim_holiday_list_mysql_006 (
holiday_date VARCHAR(256)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO dim_holiday_list_mysql_006 VALUES
('2026-04-27'),
('2026-05-08'),
('2026-05-09');
-- 5. Output table: dwm_gputj_platform_model_prediction_long_cpd
CREATE TABLE IF NOT EXISTS dwm_gputj_platform_model_prediction_long_cpd_mysql_006 (
instance_uuid VARCHAR(256),
service_name VARCHAR(256),
workload_name VARCHAR(256),
namespace VARCHAR(256),
agg_time VARCHAR(256),
agg_type BIGINT,
is_holiday BIGINT,
day_of_week BIGINT,
prediction_type VARCHAR(256),
nv_inference_count_model_avg_p90 DOUBLE,
statistic_time_count BIGINT,
nv_inference_request_duration_ms_model_avg DOUBLE,
nv_inference_queue_duration_ms_model_avg DOUBLE,
num_queued_reqs_model_avg DOUBLE,
nv_inference_request_success_model_avg DOUBLE,
nv_inference_request_failure_model_avg DOUBLE,
nv_inference_request_duration_ms_perreq_avg DOUBLE,
nv_inference_queue_duration_ms_perreq_avg DOUBLE,
nv_inference_request_duration_ms_perreq_p95 DOUBLE,
nv_inference_queue_duration_ms_perreq_p95 DOUBLE,
nv_inference_request_success_model_max DOUBLE,
nv_inference_request_failure_model_max DOUBLE,
DCGM_FI_DEV_GPU_UTIL_pod_avg DOUBLE,
k8s_container_bs_rate_cpu_core_used_request_pod_avg DOUBLE,
k8s_container_rate_mem_working_set_request_pod_avg DOUBLE,
k8s_dcgm_fi_dev_fb_util_pod_avg DOUBLE,
k8s_container_vgpu_gpu_util_pod_avg DOUBLE,
cpd_agg_time VARCHAR(256),
feature_total BIGINT,
feature_holiday_total BIGINT,
dt VARCHAR(256)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|