"ts/vscode:/vscode.git/clone" did not exist on "727ee1ce47e070061fe3dab8a2da5d3cd5e55546"
  • JB (Don)'s avatar
    Show a warning for missing attention masks when pad_token_id is not None (#24510) · 78a2b19f
    JB (Don) authored
    
    
    * Adding warning messages to BERT for missing attention masks
    
    These warning messages when there are pad tokens within the input ids and
    no attention masks are given. The warning message should only show up once.
    
    * Adding warning messages to BERT for missing attention masks
    
    These warning messages are shown when the pad_token_id is not None
    and no attention masks are given. The warning message should only
    show up once.
    
    * Ran fix copies to copy over the changes to some of the other models
    
    * Add logger.warning_once.cache_clear() to the test
    
    * Shows warning when there are no attention masks and input_ids start/end with pad tokens
    
    * Using warning_once() instead and fix indexing in input_ids check
    
    ---------
    Co-authored-by: default avatarJB Lau <hckyn@voyager2.local>
    78a2b19f
test_modeling_utils.py 50.3 KB