@@ -92,6 +92,7 @@ struct GroupInformation {
9292 /// The group size from the filename
9393 group_size : u32 ,
9494 /// The file number from the filename
95+ /// This is not the file upload count! The first file starts with 0
9596 file_number : u32 ,
9697 /// The index number from the filename
9798 idx : String ,
@@ -102,7 +103,7 @@ impl FromStr for GroupInformation {
102103 /// Parse a filename into GroupInformation
103104 /// Expected format: "prefix-groupid-groupsize-filenumber-idx.parquet"
104105 fn from_str ( file_name : & str ) -> Result < Self , Self :: Err > {
105- let re = regex:: Regex :: new ( r".*?-(\d +)-(\d+)-(\d+)-(\d+)(\.[^.]+)$" )
106+ let re = regex:: Regex :: new ( r".*?-([0-9a-fA-F] +)-(\d+)-(\d+)-(\d+)(\.[^.]+)$" )
106107 . map_err ( |e| Error :: msg ( format ! ( "Failed to compile regex: {}" , e) ) ) ?;
107108
108109 let caps = re
@@ -497,9 +498,16 @@ impl SyntheticDataValidator {
497498 async fn get_group ( & self , work_key : & str ) -> Result < Option < ToplocGroup > , Error > {
498499 let group_key = match self . build_group_for_key ( work_key) . await {
499500 Ok ( key) => key,
500- Err ( _) => return Ok ( None ) ,
501+ Err ( e) => {
502+ error ! ( "Failed to build group key for work key {}: {}" , work_key, e) ;
503+ return Ok ( None ) ;
504+ }
501505 } ;
502506 let ready_for_validation = self . is_group_ready_for_validation ( & group_key) . await ?;
507+ debug ! (
508+ "Group for key {:?} ready for validation: {:?}" ,
509+ work_key, ready_for_validation
510+ ) ;
503511 if ready_for_validation {
504512 let mut redis: redis:: Connection = self . redis_store . client . get_connection ( ) ?;
505513 let group_entries: HashMap < String , String > = redis. hgetall ( & group_key) ?;
@@ -617,9 +625,13 @@ impl SyntheticDataValidator {
617625 Some ( _) | None => {
618626 // Needs triggering (covers Pending, Invalidated, and None cases)
619627 if self . with_node_grouping {
628+ debug ! ( "Checking group for work key: {:?}" , work_key) ;
620629 let check_group = self . get_group ( & work_key) . await ?;
621630 if let Some ( group) = check_group {
631+ debug ! ( "Group found for work key: {:?}" , work_key) ;
622632 group_trigger_tasks. push ( group) ;
633+ } else {
634+ debug ! ( "Could not build a final group for work key: {:?}" , work_key) ;
623635 }
624636 } else {
625637 single_trigger_tasks. push ( ( work_key. clone ( ) , work_info) ) ;
@@ -1129,22 +1141,22 @@ mod tests {
11291141
11301142 let mock_storage = MockStorageProvider :: new ( ) ;
11311143 mock_storage. add_file (
1132- & format ! ( "Qwen/Qwen0.6/dataset/samplingn-{}-1-9-1 .parquet" , group_id) ,
1144+ & format ! ( "Qwen/Qwen0.6/dataset/samplingn-{}-1-0-0 .parquet" , group_id) ,
11331145 "file1" ,
11341146 ) ;
11351147 mock_storage. add_mapping_file (
11361148 file_sha,
1137- & format ! ( "Qwen/Qwen0.6/dataset/samplingn-{}-1-9-1 .parquet" , group_id) ,
1149+ & format ! ( "Qwen/Qwen0.6/dataset/samplingn-{}-1-0-0 .parquet" , group_id) ,
11381150 ) ;
11391151 server
11401152 . mock (
11411153 "POST" ,
1142- "/validategroup/dataset/samplingn-3450756714426841564-1-9 .parquet" ,
1154+ "/validategroup/dataset/samplingn-3450756714426841564-1-0 .parquet" ,
11431155 )
11441156 . match_body ( mockito:: Matcher :: Json ( serde_json:: json!( {
11451157 "file_shas" : [ file_sha] ,
11461158 "group_id" : group_id,
1147- "file_number" : 9 ,
1159+ "file_number" : 0 ,
11481160 "group_size" : 1
11491161 } ) ) )
11501162 . with_status ( 200 )
@@ -1153,7 +1165,7 @@ mod tests {
11531165 server
11541166 . mock (
11551167 "GET" ,
1156- "/statusgroup/dataset/samplingn-3450756714426841564-1-9 .parquet" ,
1168+ "/statusgroup/dataset/samplingn-3450756714426841564-1-0 .parquet" ,
11571169 )
11581170 . with_status ( 200 )
11591171 . with_body ( r#"{"status": "accept"}"# )
@@ -1201,7 +1213,7 @@ mod tests {
12011213 let group = group. unwrap ( ) ;
12021214 assert_eq ! ( group. group_id, group_id) ;
12031215 assert_eq ! ( group. group_size, 1 ) ;
1204- assert_eq ! ( group. file_number, 9 ) ;
1216+ assert_eq ! ( group. file_number, 0 ) ;
12051217
12061218 let result = validator. process_group_task ( group) . await ;
12071219 assert ! ( result. is_ok( ) ) ;
@@ -1302,4 +1314,13 @@ mod tests {
13021314
13031315 Ok ( ( ) )
13041316 }
1317+
1318+ #[ tokio:: test]
1319+ async fn test_group_information_from_prod_string ( ) -> Result < ( ) , Error > {
1320+ let file =
1321+ "Qwen/Qwen3-14B/PrimeIntellect/INTELLECT-2-RL-Dataset/1-d4eb155339fc64e-1-20-0.parquet" ;
1322+ let group_info = GroupInformation :: from_str ( file) ?;
1323+ println ! ( "group_info: {:?}" , group_info) ;
1324+ Ok ( ( ) )
1325+ }
13051326}
0 commit comments