Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Mar 19, 2025

What does this PR do?

This pytest option forces all tests from a test file to be run in the same CPU process when using -n X (from pytest-xdist pluging) to distribute tests across multiple CPU processes.

However, this leads some worker(s) to run much longer if a test file have tests that are slower. Removing dist": "loadfile" allows those tests are also being distributed to multiple processes.

Results:

tests_tokenization: main | 1 run on PR

  • the longest runtime among 8 paralle CircleCI runners: 8m30s | 5m
  • total runtime from all 8 paralle CircleCI runners: 43m | 27m
  • total idle time from 8 parallel CircleCI runners: 25m40s | 12m

tests_torch: main | 2 runs on PR

  • the longest runtime among 8 paralle CircleCI runners: 6m40s | (6m | 5m10s)
  • total runtime from all 8 paralle CircleCI runners: 31m15s | (30m | 28m)
  • total idle time from 8 parallel CircleCI runners: 22m 10s | (18m | 13m15s)

tests_non_model: main | 1 run on PR

  • the longest runtime among 8 paralle CircleCI runners: 6m | 2m50
  • total runtime from all 8 paralle CircleCI runners: 21m20 | 14m50
  • total idle time from 8 parallel CircleCI runners: 26m 50s | 7m 55s

@github-actions
Copy link
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the Ready for review button (at the bottom of the PR page).

@github-actions github-actions bot marked this pull request as draft March 19, 2025 06:22
@ydshieh ydshieh marked this pull request as ready for review March 19, 2025 06:23
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ydshieh ydshieh force-pushed the check_circleci_tokenizer_2 branch from 70cbed8 to 2fa2923 Compare March 19, 2025 08:46
@ydshieh ydshieh changed the title [don't merge] check loadfile Remove dist": "loadfile" for pytest for CircleCI jobs Mar 19, 2025
@ydshieh ydshieh force-pushed the check_circleci_tokenizer_2 branch from 2fa2923 to ca912ed Compare March 19, 2025 09:25
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

🚀

@ydshieh ydshieh removed the request for review from Rocketknight1 March 19, 2025 09:56
@ydshieh ydshieh merged commit b9374a0 into main Mar 19, 2025
24 checks passed
@ydshieh ydshieh deleted the check_circleci_tokenizer_2 branch March 19, 2025 10:15
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.

4 participants