CI: separate step to download nltk files#32935
Merged
gante merged 3 commits intohuggingface:mainfrom Aug 22, 2024
Merged
Conversation
|
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. |
gante
commented
Aug 22, 2024
| test_command = f"timeout {self.command_timeout} " | ||
| # junit familiy xunit1 is necessary to support splitting on test name or class name with circleci split | ||
| test_command += f"python3 -m pytest -rsfE -p no:warnings -o junit_family=xunit1 --tb=short --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags) | ||
| test_command += f"python3 -m pytest -rsfE -p no:warnings --tb=short -o junit_family=xunit1 --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags) |
Contributor
Author
There was a problem hiding this comment.
if we reorder the flags, we can see that this is the same as L188-191 (removed in this PR)
gante
added a commit
to gante/transformers
that referenced
this pull request
Aug 22, 2024
amyeroberts
reviewed
Aug 22, 2024
Comment on lines
+125
to
+127
| # Examples special case: we need to download NLTK files in advance to avoid cuncurrency issues | ||
| if "examples" in self.name: | ||
| steps.append({"run": {"name": "Download NLTK files", "command": """python -c "import nltk; nltk.download('punkt', quiet=True)" """}}) |
Contributor
There was a problem hiding this comment.
Much nicer solution :)
ArthurZucker
approved these changes
Aug 22, 2024
BernardZach
pushed a commit
to BernardZach/transformers
that referenced
this pull request
Dec 5, 2024
* separate step to download nltk files * duplicated * rm comma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Should fix #32667 : NLTK is complaining about parallelism. The parallelism stems from the
pytestcall, so we should get rid of the problem if we download the NLTK data in advance of thepytestcall 🤗