Datasets:
Download tasks/offline-compute/MySQL/mysql_002_en/init/init_db.sql from dicemy/DataClawEval: direct link, hf CLI and curl.
- Browser
- Download file 21.4 kB
-
https://huggingface.co/datasets/dicemy/DataClawEval/resolve/main/tasks/offline-compute/MySQL/mysql_002_en/init/init_db.sql
- Command line
-
hf download hf://datasets/dicemy/DataClawEval/tasks/offline-compute/MySQL/mysql_002_en/init/init_db.sql
-
curl -L -o init_db.sql https://huggingface.co/datasets/dicemy/DataClawEval/resolve/main/tasks/offline-compute/MySQL/mysql_002_en/init/init_db.sql
21.4 kB
| -- mysql_002 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: dwd_aide_inferencev2_done_service_info_h_mysql_002 ========== | |
| -- Trimmed to columns used by GT logic + columns present in seed data values. | |
| -- Original Hive table had 136 columns but INSERT data had 127 values (column mismatch). | |
| -- We keep only the columns the GT query references to ensure data integrity. | |
| CREATE TABLE IF NOT EXISTS dwd_aide_inferencev2_done_service_info_h_mysql_002 ( | |
| `name` VARCHAR(256) COMMENT '服务名称', | |
| `service_id` VARCHAR(256) COMMENT '服务ID', | |
| `gpu_name` VARCHAR(256) COMMENT 'GPU型号', | |
| `queue_name` VARCHAR(256) COMMENT '队列名称', | |
| `host_gpu_num` VARCHAR(256) COMMENT '单机GPU卡数', | |
| `host_num` VARCHAR(256) COMMENT '机器数', | |
| `status` VARCHAR(256) COMMENT '状态', | |
| `deleted` VARCHAR(256) COMMENT '是否删除', | |
| `hpa_enable` VARCHAR(256) COMMENT 'HPA开关', | |
| `ahpa_enable` VARCHAR(256) COMMENT 'AHPA开关', | |
| `instance_uuid` VARCHAR(256) COMMENT '实例UUID', | |
| `workload_name` VARCHAR(256) COMMENT '工作负载名称', | |
| `dt` VARCHAR(32) COMMENT '分区' | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
| INSERT INTO dwd_aide_inferencev2_done_service_info_h_mysql_002 | |
| (name, service_id, gpu_name, queue_name, host_gpu_num, host_num, status, deleted, hpa_enable, ahpa_enable, instance_uuid, workload_name, dt) | |
| VALUES | |
| ('svc_alpha', '1', 'A100', 'queue_gpu', '8', '2', 'done', '0', 'true', 'false', 'uuid_alpha', 'wl_alpha', '2026050700'), | |
| ('svc_beta', '2', 'V100', 'queue_cpu', '4', '3', 'done', '0', 'false', 'true', 'uuid_beta', 'wl_beta', '2026050700'), | |
| ('svc_gamma', '3', 'T4', 'queue_infer', '4', '2', 'done', '0', 'false', 'true', 'uuid_gamma', 'wl_gamma', '2026050700'), | |
| ('svc_delta', '4', 'A10', 'queue_test', '2', '1', 'done', '0', 'false', 'true', 'uuid_delta', 'wl_delta', '2026050700'), | |
| -- Coverage: svc_epsilon is a POSITIVE service (hpa enabled) that triggers the | |
| -- bias "denominator = 0 -> 1.0" branch (its HPA min_replicas=0 + expected p90=0 | |
| -- make the clamped p90 = 0). Produces 6 output rows. | |
| ('svc_epsilon', '5', 'A30', 'queue_eps', '4', '2', 'done', '0', 'true', 'false', 'uuid_epsilon', 'wl_epsilon', '2026050700'), | |
| -- Coverage decoys: each must be EXCLUDED by the service filter | |
| -- (status='done' AND deleted<>'1' AND (hpa OR ahpa)). They must NOT appear in output. | |
| ('svc_zeta', '6', 'A30', 'queue_zeta', '4', '2', 'done', '0', 'false', 'false', 'uuid_zeta', 'wl_zeta', '2026050700'), -- both flags false -> excluded | |
| ('svc_eta', '7', 'A30', 'queue_eta', '4', '2', 'done', '1', 'true', 'false', 'uuid_eta', 'wl_eta', '2026050700'), -- deleted='1' -> excluded | |
| ('svc_theta', '8', 'A30', 'queue_theta', '4', '2', 'running', '0', 'true', 'false', 'uuid_theta', 'wl_theta', '2026050700'); -- status<>'done' -> excluded | |
| -- ========== 2. Input table: dwd_tj_model_service_hpa_mysql_002 ========== | |
| CREATE TABLE IF NOT EXISTS dwd_tj_model_service_hpa_mysql_002 ( | |
| `dt` VARCHAR(32), | |
| `id` BIGINT, | |
| `serving_id` BIGINT, | |
| `min_replicas` BIGINT, | |
| `max_replicas` BIGINT, | |
| `status` BIGINT, | |
| `visible` BIGINT, | |
| `create_time` DOUBLE, | |
| `update_time` DOUBLE | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
| INSERT INTO dwd_tj_model_service_hpa_mysql_002 VALUES | |
| ('2026050700', 101, 1, 2, 10, 1, 1, 1715000000.0, 1715000100.0), | |
| ('2026050700', 102, 2, 1, 5, 1, 1, 1715000000.0, 1715000100.0), | |
| ('2026050700', 103, 3, 1, 8, 1, 1, 1715000000.0, 1715000100.0), | |
| ('2026050700', 104, 4, 1, 4, 1, 1, 1715000000.0, 1715000100.0), | |
| -- Coverage: HPA dedup distractors for serving_id=1. The correct pick (visible DESC, id DESC) | |
| -- stays id=101 (visible=1, highest id among visible=1) -> hpa_max_pods MUST remain 10*2=20. | |
| ('2026050700', 99, 1, 99, 999, 1, 1, 1715000000.0, 1715000100.0), -- visible=1 but LOWER id -> not chosen | |
| ('2026050700', 200, 1, 88, 888, 1, 0, 1715000000.0, 1715000100.0), -- HIGHER id but visible=0 -> not chosen (visible DESC wins first) | |
| -- Coverage: epsilon config with min_replicas=0 (=> clamped lower bound 0 => clamped p90=0 => bias ELSE branch) | |
| ('2026050700', 105, 5, 0, 10, 1, 1, 1715000000.0, 1715000100.0), | |
| -- HPA configs for the decoy services (so they'd produce output IF the service filter were wrong) | |
| ('2026050700', 106, 6, 1, 5, 1, 1, 1715000000.0, 1715000100.0), | |
| ('2026050700', 107, 7, 1, 5, 1, 1, 1715000000.0, 1715000100.0), | |
| ('2026050700', 108, 8, 1, 5, 1, 1, 1715000000.0, 1715000100.0); | |
| -- ========== 3. Input table: nextgen_platform_dsl_autotune_rec_gpu_config_fht0_mysql_002 ========== | |
| CREATE TABLE IF NOT EXISTS nextgen_platform_dsl_autotune_rec_gpu_config_fht0_mysql_002 ( | |
| `databus_imp_date` VARCHAR(32), | |
| `service_name` VARCHAR(256), | |
| `cluster_id` VARCHAR(256), | |
| `namespace` VARCHAR(256), | |
| `workload_kind` VARCHAR(256), | |
| `workload_name` VARCHAR(256), | |
| `platform` VARCHAR(256), | |
| `future_point` VARCHAR(256), | |
| `step` VARCHAR(256), | |
| `unit` VARCHAR(256), | |
| `response_code` VARCHAR(256), | |
| `experiment_id` VARCHAR(256), | |
| `rec_config` VARCHAR(256), | |
| `response_msg` VARCHAR(256), | |
| `timestamp` VARCHAR(256), | |
| `experiment_cost_ms` VARCHAR(256) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
| INSERT INTO nextgen_platform_dsl_autotune_rec_gpu_config_fht0_mysql_002 VALUES | |
| ('2026050700','svc_beta','cls1','ns_beta','Deployment','wl_beta','platform1','fp1','1','min','200','exp1','{}','ok','1715100500000','100'), | |
| ('2026050700','svc_beta','cls1','ns_beta','Deployment','wl_beta','platform1','fp2','1','min','200','exp2','{}','ok','1715100400000','110'), | |
| ('2026050700','svc_beta','cls1','ns_beta','Deployment','wl_beta','platform1','fp3','1','min','500','exp3','{}','err','1715100000000','90'), | |
| ('2026050700','svc_gamma','cls2','ns_gamma','Deployment','wl_gamma','platform2','fp4','1','min','500','exp4','{}','err','1715100300000','80'), | |
| ('2026050700','svc_gamma','cls2','ns_gamma','Deployment','wl_gamma','platform2','fp5','1','min','400','exp5','{}','err','1715100200000','70'), | |
| ('2026050700','svc_delta','cls3','ns_delta','Deployment','wl_delta','platform3','fp6','1','min','200','exp6','{}','ok','1715099000000','60'); | |
| -- ========== 4. Input table: dwm_gputj_platform_hourly_expected_pod_mysql_002 ========== | |
| CREATE TABLE IF NOT EXISTS dwm_gputj_platform_hourly_expected_pod_mysql_002 ( | |
| `service_name` VARCHAR(256), | |
| `instance_uuid` VARCHAR(256), | |
| `workload_name` VARCHAR(256), | |
| `namespace` VARCHAR(256), | |
| `agg_time` VARCHAR(256), | |
| `hour_of_day` VARCHAR(256), | |
| `day_type` VARCHAR(256), | |
| `day_of_week` BIGINT, | |
| `model_req_count` DOUBLE, | |
| `rec_type` VARCHAR(256), | |
| `hist_avg_qpm_avg` DOUBLE, | |
| `hist_avg_qpm_p50` DOUBLE, | |
| `hist_avg_qpm_p90` DOUBLE, | |
| `expected_pod_avg_qpm_avg` DOUBLE, | |
| `expected_pod_avg_qpm_p50` DOUBLE, | |
| `expected_pod_avg_qpm_p90` DOUBLE, | |
| `hist_max_qpm_avg` DOUBLE, | |
| `hist_max_qpm_p50` DOUBLE, | |
| `hist_max_qpm_p90` DOUBLE, | |
| `expected_pod_max_qpm_avg` DOUBLE, | |
| `expected_pod_max_qpm_p50` DOUBLE, | |
| `expected_pod_max_qpm_p90` DOUBLE, | |
| `latest_avg_qpm` DOUBLE, | |
| `latest_max_qpm` DOUBLE, | |
| `expected_pod_latest_avg_qpm` DOUBLE, | |
| `expected_pod_latest_max_qpm` DOUBLE, | |
| `dt` VARCHAR(32) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
| INSERT INTO dwm_gputj_platform_hourly_expected_pod_mysql_002 VALUES | |
| ('svc_alpha','uuid_alpha','wl_alpha','ns_alpha','2026-05-07 07:00:00','07:00:00','workday',3,1500.0,'p90',50.0,48.0,55.0,3.0,2.8,3.2,80.0,75.0,85.0,4.0,3.8,4.2,60.0,90.0,3.5,4.5,'20260507'), | |
| ('svc_beta','uuid_beta','wl_beta','ns_beta','2026-05-07 07:00:00','07:00:00','workday',3,2000.0,'p90',100.0,95.0,110.0,5.0,4.5,5.5,150.0,140.0,160.0,6.0,5.5,6.5,120.0,180.0,5.8,7.0,'20260507'), | |
| ('svc_gamma','uuid_gamma','wl_gamma','ns_gamma','2026-05-07 07:00:00','07:00:00','workday',3,800.0,'p90',30.0,28.0,35.0,1.5,1.8,4.0,50.0,45.0,55.0,5.0,6.0,8.0,40.0,60.0,3.0,10.0,'20260507'), | |
| ('svc_delta','uuid_delta','wl_delta','ns_delta','2026-05-07 07:00:00','07:00:00','workday',3,400.0,'p90',10.0,8.0,15.0,0.5,0.8,2.5,20.0,18.0,25.0,3.0,3.5,4.5,15.0,25.0,1.5,5.0,'20260507'), | |
| -- Coverage: svc_epsilon. expected_pod_avg_qpm_p90 = 0.0 and HPA min=0 => clamped p90 = 0 => bias ELSE-branch (1.0). | |
| -- All raw expected_pod values are within [min=0, max=20] so clamp leaves them unchanged. | |
| ('svc_epsilon','uuid_epsilon','wl_epsilon','ns_epsilon','2026-05-07 07:00:00','07:00:00','workday',3,600.0,'p90',10.0,8.0,12.0,1.0,1.5,0.0,20.0,18.0,22.0,2.0,2.5,3.0,12.0,20.0,1.2,2.2,'20260507'), | |
| -- Coverage: expected rows for decoy services (so they'd surface in output IF the service filter were wrong). | |
| ('svc_zeta','uuid_zeta','wl_zeta','ns_zeta','2026-05-07 07:00:00','07:00:00','workday',3,100.0,'p90',5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,2.0,2.0,'20260507'), | |
| ('svc_eta','uuid_eta','wl_eta','ns_eta','2026-05-07 07:00:00','07:00:00','workday',3,100.0,'p90',5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,2.0,2.0,'20260507'), | |
| ('svc_theta','uuid_theta','wl_theta','ns_theta','2026-05-07 07:00:00','07:00:00','workday',3,100.0,'p90',5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,5.0,2.0,2.0,2.0,5.0,5.0,2.0,2.0,'20260507'), | |
| -- Coverage: stale-partition decoy for svc_alpha. Correct GT takes MAX(dt)=20260507 and IGNORES this bogus 20260505 row. | |
| ('svc_alpha','uuid_alpha','wl_alpha','ns_alpha','2026-05-07 07:00:00','07:00:00','workday',3,9999.0,'p90',99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,'20260505'); | |
| -- ========== 5. Input table: dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_002 ========== | |
| -- Only includes columns used by GT + columns present in seed INSERT. | |
| CREATE TABLE IF NOT EXISTS dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_002 ( | |
| `dt` VARCHAR(32), | |
| `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 COLLATE=utf8mb4_unicode_ci; | |
| INSERT INTO dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_002 VALUES | |
| ('2026050700','svc_alpha','uuid_alpha',2,'2026-05-07 07:00:00',4,60.0,0.5,0.6,0.7,0.0,80.0,0.8,0.9,0.85,0.0,240.0,100.0,120.0,50.0,80.0,5.0,10.0,2.0,5.0,98.0,110.0,2.0,5.0,0.5,0.8,0.05,0.1,0.7,0.08,25.0,30.0,0,'llm',4,1,1.0,8,2,'08:00','22:00',10,'A100','queue_gpu','proj1','ws1','online','bs1','ss1','qm1','none',8,2,4.0,'ns_alpha','wl_alpha',0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1,0.01,0.05,5.0,80.0,100.0,115.0,55,5,0.3,0.5,0.7,55,5,600.0,2.0,0.003,0.01,1.0,0.001,0.005,10.0,15.0,8.0,50.0,70.0,20.0,30.0,500.0,600.0,1.0,2.0,0.0,0.0,1.0,2.0,45.0,60.0,9.0,12.0), | |
| ('2026050600','svc_alpha','uuid_alpha',2,'2026-05-06 06:00:00',4,55.0,0.4,0.5,0.6,0.0,75.0,0.7,0.8,0.8,0.0,220.0,90.0,110.0,45.0,70.0,4.0,8.0,1.5,4.0,88.0,100.0,1.0,3.0,0.45,0.7,0.04,0.09,0.65,0.07,22.0,27.0,0,'llm',4,1,1.0,8,2,'08:00','22:00',10,'A100','queue_gpu','proj1','ws1','online','bs1','ss1','qm1','none',8,2,3.8,'ns_alpha','wl_alpha',0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.09,0.01,0.04,4.5,70.0,90.0,105.0,50,4,0.25,0.45,0.65,50,4,550.0,1.5,0.002,0.008,0.8,0.001,0.004,9.0,13.0,7.0,45.0,65.0,18.0,28.0,450.0,550.0,0.8,1.5,0.0,0.0,0.8,1.5,40.0,55.0,8.0,11.0), | |
| ('2026050700','svc_beta','uuid_beta',2,'2026-05-07 07:00:00',8,70.0,0.6,0.7,0.8,0.0,90.0,0.9,0.95,0.9,0.0,560.0,200.0,240.0,30.0,50.0,3.0,6.0,3.0,8.0,195.0,230.0,5.0,10.0,0.15,0.21,0.015,0.03,0.18,0.025,25.0,30.0,0,'cv',8,2,2.0,12,4,'06:00','23:00',5,'V100','queue_cpu','proj2','ws2','online','bs2','ss2','qm2','none',4,3,7.5,'ns_beta','wl_beta',0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.12,0.02,0.06,6.0,150.0,200.0,230.0,58,8,0.1,0.15,0.2,58,8,1200.0,5.0,0.004,0.015,2.0,0.001,0.006,12.0,18.0,9.0,60.0,80.0,25.0,35.0,1000.0,1200.0,1.5,3.0,0.0,0.0,2.0,3.0,28.0,40.0,11.0,15.0), | |
| ('2026050700','svc_gamma','uuid_gamma',2,'2026-05-07 07:00:00',5,40.0,0.3,0.4,0.5,0.0,50.0,0.4,0.5,0.6,0.0,160.0,60.0,80.0,20.0,30.0,2.0,4.0,1.0,3.0,58.0,70.0,3.0,6.0,0.08,0.12,0.008,0.015,0.09,0.012,10.0,12.0,0,'llm',5,1,1.0,8,3,'08:00','22:00',8,'T4','queue_infer','proj3','ws3','online','bs3','ss3','qm3','none',4,2,5.0,'ns_gamma','wl_gamma',0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.05,0.01,0.03,3.0,50.0,70.0,85.0,40,5,0.15,0.25,0.35,40,5,400.0,2.0,0.002,0.005,0.5,0.001,0.003,5.0,8.0,4.0,25.0,35.0,10.0,15.0,200.0,300.0,0.5,1.0,0.0,0.0,0.5,1.0,20.0,30.0,4.0,6.0), | |
| ('2026050700','svc_delta','uuid_delta',2,'2026-05-07 07:00:00',3,20.0,0.2,0.3,0.4,0.0,30.0,0.3,0.4,0.5,0.0,80.0,30.0,40.0,10.0,15.0,1.0,2.0,0.5,2.0,28.0,35.0,1.5,3.0,0.04,0.06,0.004,0.008,0.05,0.006,5.0,6.0,0,'llm',3,1,0.5,4,1,'09:00','21:00',4,'A10','queue_test','proj4','ws4','online','bs4','ss4','qm4','none',2,1,3.0,'ns_delta','wl_delta',0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.03,0.005,0.02,1.5,25.0,35.0,40.0,20,3,0.08,0.12,0.18,20,3,200.0,1.0,0.001,0.003,0.3,0.0005,0.002,2.0,4.0,2.0,10.0,15.0,5.0,8.0,100.0,150.0,0.3,0.5,0.0,0.0,0.3,0.5,10.0,15.0,2.0,3.0); | |
| -- Coverage augmentation for the actual-pod feature table (column-list INSERT; | |
| -- unlisted feature columns default to NULL). | |
| -- * svc_epsilon: 1 VALID row (agg_type=2, avg_pod_count>0) -> actual_pod_count=5.0 | |
| -- * svc_beta decoys: each must be DROPPED by the actual filter | |
| -- (agg_type=2 AND avg_pod_count>0 AND dt in [2026050600, 2026050700]). | |
| -- If any leaks, svc_beta actual_pod_count (correct=7.5) changes. | |
| INSERT INTO dwm_gputj_platform_gpu_base_feature_agg_v2_mysql_002 | |
| (dt, service_name, instance_uuid, agg_type, agg_time, pod_count, avg_pod_count, namespace, gpu_name, queue_name, host_gpu_num, host_num) | |
| VALUES | |
| ('2026050700','svc_epsilon','uuid_epsilon',2,'2026-05-07 07:00:00',5,5.0,'ns_epsilon','A30','queue_eps',4,2), | |
| ('2026050700','svc_beta','uuid_beta',1,'2026-05-07 07:00:00',99,99.0,'ns_beta','V100','queue_cpu',4,3), -- agg_type<>2 -> excluded | |
| ('2026050700','svc_beta','uuid_beta',2,'2026-05-07 07:00:00',0,0.0,'ns_beta','V100','queue_cpu',4,3), -- avg_pod_count<=0 -> excluded | |
| ('2026050500','svc_beta','uuid_beta',2,'2026-05-05 07:00:00',99,99.0,'ns_beta','V100','queue_cpu',4,3); -- dt < 2026050600 -> excluded | |
| -- ========== 6. Output table: dwm_gputj_platform_replica_forecast_with_bias_cand_mysql_002 ========== | |
| -- dt is a regular column (MySQL has no partition concept like Hive). | |
| CREATE TABLE IF NOT EXISTS dwm_gputj_platform_replica_forecast_with_bias_cand_mysql_002 ( | |
| `service_name` VARCHAR(256) COMMENT '服务名称', | |
| `instance_uuid` VARCHAR(256) COMMENT '实例UUID', | |
| `workload_name` VARCHAR(256) COMMENT '工作负载名称', | |
| `namespace` VARCHAR(256) COMMENT '命名空间', | |
| `agg_time` VARCHAR(256) COMMENT '预测时间点(yyyy-MM-dd HH:mm:00), 10分钟粒度', | |
| `hour_of_day` VARCHAR(256) COMMENT '小时(HH:00:00)', | |
| `scale_type` VARCHAR(256) COMMENT '扩缩容类型: hpa/ahpa', | |
| `host_num` BIGINT COMMENT '机器数', | |
| `gpu_name` VARCHAR(256) COMMENT 'GPU型号', | |
| `queue_name` VARCHAR(256) COMMENT '队列名称', | |
| `hpa_min_pods` BIGINT COMMENT 'HPA最小pod数', | |
| `hpa_max_pods` BIGINT COMMENT 'HPA最大pod数', | |
| `ahpa_min_pods` BIGINT COMMENT 'AHPA最小pod数', | |
| `ahpa_max_pods` BIGINT COMMENT 'AHPA最大pod数', | |
| `ahpa_status` VARCHAR(256) COMMENT 'AHPA推荐状态: normal/degraded/no_request', | |
| `ahpa_response_code` VARCHAR(256) COMMENT 'AHPA最近的response_code', | |
| `expected_pod_avg_qpm_avg` DOUBLE COMMENT '预期pod数(基于16天avg_qpm均值, clamp后)', | |
| `expected_pod_avg_qpm_p50` DOUBLE COMMENT '预期pod数(基于16天avg_qpm P50, clamp后)', | |
| `expected_pod_avg_qpm_p90` DOUBLE COMMENT '预期pod数(基于16天avg_qpm P90, clamp后)', | |
| `expected_pod_max_qpm_avg` DOUBLE COMMENT '预期pod数(基于16天max_qpm均值, clamp后)', | |
| `expected_pod_max_qpm_p50` DOUBLE COMMENT '预期pod数(基于16天max_qpm P50, clamp后)', | |
| `expected_pod_max_qpm_p90` DOUBLE COMMENT '预期pod数(基于16天max_qpm P90, clamp后)', | |
| `expected_pod_latest_avg_qpm` DOUBLE COMMENT '预期pod数(基于最新日avg_qpm, clamp后)', | |
| `expected_pod_latest_max_qpm` DOUBLE COMMENT '预期pod数(基于最新日max_qpm, clamp后)', | |
| `actual_pod_count` DOUBLE COMMENT '近n小时实际平均pod数', | |
| `bias_coefficient` DOUBLE COMMENT '偏差系数(实际/clamp后预估)', | |
| `dt` VARCHAR(32) COMMENT '分区字段', | |
| `host_gpu_num` BIGINT COMMENT '单机GPU卡数', | |
| `model_req_count` DOUBLE COMMENT '模型总请求量(预估流量)' | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |