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

ci: add test for Huggingface Accelerate #1257

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dvrogozh
Copy link
Contributor

@dvrogozh dvrogozh commented Jan 7, 2025

Changes:

  • Add test for Huggingface Accelerate
  • Add action to print out key environment information
  • Add parse-junitxml.py script to parse JUnit XML reports produced with pytest --junitxml= option

@dvrogozh dvrogozh force-pushed the accelerate branch 15 times, most recently from b728584 to 6666291 Compare January 8, 2025 00:52
@dvrogozh dvrogozh marked this pull request as ready for review January 8, 2025 01:06
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.

I'd prefer to clean the transformers tests of the first step and then expand to the ecosystem libraries

.github/workflows/_linux_accelerate.yml Show resolved Hide resolved
- name: Prepare Stock XPU Pytorch
run: |
source activate $CONDA_ENV_NAME
if [ -z "${{ inputs.nightly_whl }}" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we plan this test only target for torch cpu nightly wheel? latest nightly or a specific nightly version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suggest to target it for latest nightly triggered per schedule daily. @chuanqi129 : are you ok if I will drop input parameter to set nightly version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dropped inputs.nightly_whl for now and just install latest nightly. Note that this parameter in any case would need a change since it controls only torch version and does not allow to set version for torchvision and torchaudio. So, if needed, we can add these options later on.

ZE_AFFINITY_MASK: 0
PARSE_JUNIT: ${{ github.workspace }}/torch-xpu-ops/.github/scripts/parse-junitxml.py
steps:
- name: Checkout torch-xpu-ops
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we don't need checkout torch-xpu-ops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need it. Workflow uses:

  • .github/scripts/parse-junitxml.py
  • .github/actions/print-environment/action.yml

from torch-xpu-ops repo. However, I forgot to add .py script to the dependencies of this workflow and I also I forgot to drop spec.py which is Transformers specific - I will fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However, I forgot to add .py script to the dependencies of this workflow and I also I forgot to drop spec.py which is Transformers specific - I will fix that.

Done.

.github/workflows/_linux_accelerate.yml Outdated Show resolved Hide resolved
@dvrogozh
Copy link
Contributor Author

dvrogozh commented Jan 8, 2025

I'd prefer to clean the transformers tests of the first step and then expand to the ecosystem libraries

For Accelerate it's not actually expansion to ecosystem. It's closing a test gap for Transformers. Note - Accelerate is a prerequisite library for Transformers. If something breaks in Accelerate there is high chance that Transformer tests will also start to fall apart.

@dvrogozh dvrogozh force-pushed the accelerate branch 2 times, most recently from f3a9804 to c959881 Compare January 8, 2025 19:37
@dvrogozh dvrogozh marked this pull request as draft January 8, 2025 21:08
Script parses output of JUnit result XML files which can be generated
by pytest -junit-xml=report.xml option. The intended usage of
the script:

* Print report tables in Markdown format. Use script arguments to
  control output:

  * `parse-junitxml.py --stats` to print stats table
  * `parse-junitxml.py --failed` to print table with failed cases
  * `parse-junitxml.py --skipped` to print table with skipped cases
  * etc.

* Print report tables in Json or Json-line formats. Add `--json` to
  the script command line.

Signed-off-by: Dmitry Rogozhkin <[email protected]>
@dvrogozh dvrogozh marked this pull request as ready for review January 8, 2025 23:00
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