- 
                Notifications
    
You must be signed in to change notification settings  - Fork 28
 
【Hackathon 9th No.112】feat(fix): stabilize 17 torch samples by constraints and -inf replacement (no NaN/Inf) #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
      
        
          +78
        
        
          −28
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    - Enhanced replay_tensor() to support min_val and max_val clamping for all dtypes - Updated convert_meta_classes_to_tensors() to handle constraints separately for int vs float - Added min_val=0.0, max_val=1.0 constraints to reference_points tensors in: - IDEA-Research_grounding-dino-base - fushh7_llmdet_swin_tiny_hf - This fixes NaN/inf issues caused by unchecked tensor value ranges Related to: NO.112
- Enhanced replay_tensor() with numerical stability checks for floating-point tensors - Added comprehensive min_val/max_val constraints to all tensors in weight_meta.py - Replaced -inf with -1e6 in model.py to prevent NaN propagation in sigmoid operations - Fixed std=0 case handling to avoid generating identical values - Both nope and inductor backends now pass without NaN/inf This completes the fix for NO.112 illegal torch samples.
… formatting - Replaced -inf with -1e6 in fushh7_llmdet_swin_tiny_hf/model.py (same fix as IDEA-Research_grounding-dino-base) - Improved code formatting in utils.py (removed trailing spaces, better line breaks) - Both nope and inductor backends now pass without NaN for this sample
| 
           Thanks for your contribution!  | 
    
| 
           @luotao1 好像遇到点网络问题  | 
    
| 
           @Xreki 请求检查一下  | 
    
              
                    lixinqi
  
              
              reviewed
              
                  
                    Oct 31, 2025 
                  
              
              
            
            
- Add -inf to -1e6 replacement logic in apply_templates for newly generated models - Add runtime replacement logic in load_class_from_file for existing models - Fix NaN issues in masked_fill and torch.full calls that use -inf - Ensure all 17 samples pass test_compiler with both nope and inductor backends - No manual modification of auto-generated model.py files required
- Add -inf to -1e6 replacement logic in apply_templates for newly generated models - Add runtime replacement logic in load_class_from_file for existing models - Fix NaN issues in masked_fill and torch.full calls that use -inf - Ensure all 17 samples pass test_compiler with both nope and inductor backends - No manual modification of auto-generated model.py files required
… original format)
              
                    lixinqi
  
              
              reviewed
              
                  
                    Nov 3, 2025 
                  
              
              
            
            
- 从test_compiler.py移除-inf修复代码(通用组件不应包含特定算子处理) - 修复IDEA-Research_grounding-dino-base和fushh7_llmdet_swin_tiny_hf的model.py,将-inf替换为-1e6 - 验证所有17个问题样本在inductor和nope后端均不再出现NaN - 修复方案:仅在样本层面修复-inf问题,不修改通用组件
              
                    lixinqi
  
              
              approved these changes
              
                  
                    Nov 3, 2025 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
PR Category
Description