• Yih-Dar's avatar
    Improve PT/TF equivalence test (#16557) · dce33f21
    Yih-Dar authored
    
    
    * add error message
    
    * Use names in the error message
    
    * allow ModelOutput
    
    * rename to check_pt_tf_outputs and move outside
    
    * fix style
    
    * skip past_key_values in a better way
    
    * Add comments
    
    * improve code for label/loss
    
    * make the logic clear by moving the ignore keys out
    
    * fix _postprocessing_to_ignore
    
    * fix _postprocessing_to_ignore: create new outputs from the remaining fields
    
    * ignore past_key_values in TFGPT2 models for now
    
    * make check_pt_tf_outputs better regarding names
    
    * move check_pt_tf_models outside
    
    * rename methods
    
    * remove test_pt_tf_model_equivalence in TFCLIPModelTest
    
    * Reduce TFViTMAEModelTest.test_pt_tf_model_equivalence
    
    * move prepare_pt_inputs_from_tf_inputs outside check_pt_tf_models
    
    * Fix quality
    
    * Clean-up TFLxmertModelTester.test_pt_tf_model_equivalence
    
    * Fix quality
    
    * fix
    
    * fix style
    
    * Clean-up TFLEDModelTest.test_pt_tf_model_equivalence
    
    * Fix quality
    
    * add docstring
    
    * improve comment
    Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
    dce33f21
test_modeling_tf_common.py 80.2 KB