Skip to content
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

Removed inputs_processing and replaced with decorator for lxmert #16414

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

silvererudite
Copy link
Contributor

@silvererudite silvererudite commented Mar 25, 2022

What does this PR do?

Replaces usage of inputs_processing with decorator unpack_input in lxmert

See #16051

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@gante

@silvererudite
Copy link
Contributor Author

All tests pass after running RUN_SLOW=1 py.test -vv tests/lxmert/test_modeling_tf_lxmert.py

tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_attention_outputs PASSED                                                                                                       [  2%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_compile_tf_model PASSED                                                                                                        [  5%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_config PASSED                                                                                                                  [  8%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_determinism <- tests\test_modeling_tf_common.py PASSED                                                                         [ 11%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_forward_signature <- tests\test_modeling_tf_common.py PASSED                                                                   [ 14%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_generate_with_headmasking <- tests\test_modeling_tf_common.py PASSED                                                           [ 17%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_headmasking <- tests\test_modeling_tf_common.py PASSED                                                                         [ 20%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_hidden_states_output PASSED                                                                                                    [ 23%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_initialization <- tests\test_modeling_tf_common.py PASSED                                                                      [ 26%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_inputs_embeds <- tests\test_modeling_tf_common.py PASSED                                                                       [ 29%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_keras_save_load <- tests\test_modeling_tf_common.py PASSED                                                                     [ 32%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_keyword_and_dict_args <- tests\test_modeling_tf_common.py PASSED                                                               [ 35%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lm_head_model_beam_search_generate_dict_outputs <- tests\test_modeling_tf_common.py PASSED                                     [ 38%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lm_head_model_no_beam_search_generate_dict_outputs <- tests\test_modeling_tf_common.py PASSED                                  [ 41%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lm_head_model_random_beam_search_generate <- tests\test_modeling_tf_common.py PASSED                                           [ 44%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lm_head_model_random_no_beam_search_generate <- tests\test_modeling_tf_common.py PASSED                                        [ 47%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_load_with_mismatched_shapes <- tests\test_modeling_tf_common.py PASSED                                                         [ 50%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_loss_computation <- tests\test_modeling_tf_common.py PASSED                                                                    [ 52%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lxmert_for_pretraining PASSED                                                                                                  [ 55%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_lxmert_model PASSED                                                                                                            [ 58%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_common_attributes PASSED                                                                                                 [ 61%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_from_pretrained SKIPPED (test is slow)                                                                                   [ 64%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_main_input_name <- tests\test_modeling_tf_common.py PASSED                                                               [ 67%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_model_outputs_equivalence <- tests\test_modeling_tf_common.py PASSED                                                           [ 70%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_numpy_arrays_inputs <- tests\test_modeling_tf_common.py PASSED                                                                 [ 73%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_onnx_compliancy <- tests\test_modeling_tf_common.py PASSED                                                                     [ 76%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_onnx_runtime_optimize <- tests\test_modeling_tf_common.py SKIPPED (test is slow)                                               [ 79%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_pt_tf_model_equivalence PASSED                                                                                                 [ 82%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_resize_token_embeddings <- tests\test_modeling_tf_common.py PASSED                                                             [ 85%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_save_load PASSED                                                                                                               [ 88%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_save_load_config <- tests\test_modeling_tf_common.py PASSED                                                                    [ 91%]
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_saved_model_creation PASSED                                                                                                    [ 94%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelTest::test_saved_model_creation_extended SKIPPED (test is slow)                                                                           [ 97%] 
tests/lxmert/test_modeling_tf_lxmert.py::TFLxmertModelIntegrationTest::test_inference_masked_lm SKIPPED (test is slow)                                                                          [100%] 

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 25, 2022

The documentation is not available anymore as the PR was closed or merged.

@silvererudite
Copy link
Contributor Author

silvererudite commented Mar 25, 2022

Hi again @gante remade all the changes in this fresh PR..so sorry that you need to review once again. In turn I realized I need to learn more git 😅

@gante gante self-requested a review March 27, 2022 17:06
Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This time all good 🔥 Thank you for the contribution!

As for git skills -- yeah, they are super important for these large projects. As you've seen in your other PR, one wrong command can create a lot of work. Practice makes it perfect 💪

@gante gante merged commit 3dc8242 into huggingface:main Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants