Skip to content

ci: update Transformers to v4.51.3 #1282

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
merged 4 commits into from
Jun 3, 2025
Merged

Conversation

dvrogozh
Copy link
Contributor

@dvrogozh dvrogozh commented Jan 13, 2025

Changes:

  • Benchmarking scripts are pruned from Transformers by v4.49.0 due to deprecation. So we don't need to test them anymore.
  • Some cuda specific tests were generalized to cover non-cuda devices which uncovered some issues.
  • Some new tests were added which fail for both cuda and xpu.
  • Few regressions due to changes on Transformers side
  • Time required to run the test on a single system increased from around 2h to 4h
  • Test split by matrix to be able to test in smaller rerunnable chunks
  • Test chunks are run sequentially due to issue with parallel HF downloads

Signed-off-by: Dmitry Rogozhkin [email protected]

@dvrogozh dvrogozh marked this pull request as ready for review January 13, 2025 22:00
@dvrogozh dvrogozh marked this pull request as draft January 14, 2025 01:02
@dvrogozh dvrogozh force-pushed the transformers branch 2 times, most recently from 62ed9a5 to fef2644 Compare January 14, 2025 17:34
@dvrogozh
Copy link
Contributor Author

dvrogozh commented Jan 14, 2025

Transformers v4.48.0 has a regression in tests:

# TRANSFORMERS_TEST_DEVICE_SPEC=spec.py python3 -m pytest tests/models/marian/test_modeling_marian.py -k backbone

E   ModuleNotFoundError: No module named 'transformers.models.marian.convert_marian_to_pytorch'

I don't see this issue in main at c23a1c193. It might be reasonable to wait for v4.49.0 or bring this issue to HF if it will persist.

@dvrogozh
Copy link
Contributor Author

Transformers v4.48.0 has a regression in tests:

Same issue observed on v4.49.0. I reported it to Transformers project and will exclude the test manually for now:

@dvrogozh dvrogozh changed the title ci: update Transformers to v4.48.0 ci: update Transformers to v4.49.0 Feb 18, 2025
@dvrogozh dvrogozh changed the title ci: update Transformers to v4.49.0 ci: update Transformers to v4.48.3 Feb 19, 2025
@dvrogozh dvrogozh changed the title ci: update Transformers to v4.48.3 ci: update Transformers to v4.49.0 Feb 20, 2025
@dvrogozh dvrogozh force-pushed the transformers branch 4 times, most recently from d0551c7 to 93a1366 Compare February 26, 2025 00:27
@chuanqi129
Copy link
Contributor

chuanqi129 commented Apr 17, 2025

@dvrogozh do we still need this PR? There are some code conflict

@dvrogozh
Copy link
Contributor Author

@dvrogozh do we still need this PR? There are some code conflict

We need it. That's my attempt to update tested Transformers version. This unfortunately stepped into an issue of increased test time due to which we started to catch infrastructure errors (like fetching some content from HF) without a way to efficiently rerun some tests. I have an idea how to handle that, but this needs some time which slips away. I will work on that in the coming weeks.

@dvrogozh dvrogozh force-pushed the transformers branch 11 times, most recently from 3dd39dc to 6284d3f Compare April 19, 2025 02:49
@dvrogozh dvrogozh force-pushed the transformers branch 3 times, most recently from a1e33b7 to 3597fd5 Compare April 23, 2025 14:23
@dvrogozh dvrogozh force-pushed the transformers branch 12 times, most recently from fbc5958 to ce5fbb6 Compare May 30, 2025 18:34
dvrogozh added 2 commits May 30, 2025 11:34
Changes:
* Benchmarking scripts are pruned from Transformers by v4.49.0 due to
  deprecation. So we don't need to test them anymore.
* Some cuda specific tests were generalized to cover non-cuda devices
  which uncovered some issues.
* Some new tests were added which fail for both cuda and xpu.
* Few regressions due to changes on Transformers side

Fixed tests:
* huggingface/transformers@b912f5e
  * `tests/models/git/test_modeling_git.py::GitModelTest::test_inputs_embeds_matches_input_ids`
* huggingface/transformers@b5aaf87
  * `tests/pipelines/test_pipelines_video_classification.py::VideoClassificationPipelineTests::test_small_model_pt`
  * `tests/test_pipeline_mixin.py::VideoClassificationPipelineTests::test_small_model_pt`
* huggingface/transformers@42c8ccf
  * `tests/generation/test_utils.py::GenerationIntegrationTests::test_generated_length_assisted_generation`
* huggingface/transformers@9fd123a
  * `test_model_parallelization`
  * `test_model_parallel_equal_results`

Commits which added new tests (or enabled previously skipped tests) which fail:
* huggingface/transformers@23d782e
  * `tests/pipelines/test_pipelines_text_generation.py::TextGenerationPipelineTests::test_return_dict_in_generate`
  * `tests/test_pipeline_mixin.py::TextGenerationPipelineTests::test_return_dict_in_generate`
* huggingface/transformers@2fa876d
  * `test_cpu_offload` (some of)
  * `test_disk_offload_bin` (some of)
  * `test_disk_offload_safetensors` (some of)
  * `tests/pipelines/test_pipelines_text_generation.py::TextGenerationPipelineTests::test_small_model_pt_bloom_accelerate`
* huggingface/transformers@be2ac09
  * `tests/models/paligemma/test_modeling_paligemma.py::PaliGemmaForConditionalGenerationModelTest::test_generate_compilation_all_outputs`
  * `tests/models/paligemma2/test_modeling_paligemma2.py::PaliGemma2ForConditionalGenerationModelTest::test_generate_compilation_all_outputs`
* huggingface/transformers#36340
  * `tests/pipelines/test_pipelines_audio_classification.py::AudioClassificationPipelineTests::test_small_model_pt_fp16`
* huggingface/transformers@1fae54c
  * `tests/trainer/test_trainer.py::TrainerIntegrationPrerunTest::test_gradient_accumulation_loss_alignment_with_model_loss`
* huggingface/transformers@15ec971
  * `tests/models/qwen2_5_vl/test_processor_qwen2_5_vl.py::Qwen2_5_VLProcessorTest::test_chat_template_video_custom_sampling`
  * `tests/models/qwen2_5_vl/test_processor_qwen2_5_vl.py::Qwen2_5_VLProcessorTest::test_chat_template_video_special_processing`

Regressions:
* huggingface/transformers@365fecb
  * `tests/generation/test_utils.py::GenerationIntegrationTests::test_encoder_decoder_generate_attention_mask`
* huggingface/transformers@da334bc
  * `tests/generation/test_utils.py::GenerationIntegrationTests::test_generate_input_features_as_encoder_kwarg`
* huggingface/transformers@bcfc9d7
  * `tests/models/llava/test_modeling_llava.py::LlavaForConditionalGenerationModelTest::test_config`
* huggingface/transformers#36267
  * `tests/utils/test_import_utils.py`
* huggingface/transformers#36267
  * `tests/models/marian/test_modeling_marian.py`

Signed-off-by: Dmitry Rogozhkin <[email protected]>
@dvrogozh dvrogozh changed the title ci: update Transformers to v4.49.0 ci: update Transformers to v4.51.3 May 30, 2025
Fixed tests:
* huggingface/transformers@24e311f
  * `tests/generation/test_logits_process.py::LogitsProcessorTest::test_watermarking_processor`
* huggingface/transformers@77aa9fc
  * `tests/generation/test_utils.py::GenerationIntegrationTests::test_encoder_decoder_generate_attention_mask`
* huggingface/accelerate@8ab01d3
  * `tests/models/blip/test_modeling_blip.py::BlipTextImageModelTest::test_cpu_offload`
  * `tests/models/blip/test_modeling_blip.py::BlipTextImageModelTest::test_disk_offload_bin`
  * `tests/models/blip/test_modeling_blip.py::BlipTextImageModelTest::test_disk_offload_safetensors`
  * etc.

Signed-off-by: Dmitry Rogozhkin <[email protected]>
@dvrogozh dvrogozh marked this pull request as ready for review June 2, 2025 17:46
@dvrogozh dvrogozh requested a review from chuanqi129 June 2, 2025 17:46
Copy link
Contributor

@chuanqi129 chuanqi129 left a comment

Choose a reason for hiding this comment

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

LGTM

@chuanqi129 chuanqi129 added this pull request to the merge queue Jun 3, 2025
Merged via the queue into intel:main with commit a3a196c Jun 3, 2025
37 checks passed
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.

2 participants