-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Test] Add transformers test #1175
Merged
+143
−1
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3d59000
Add transformers est
RUIJIEZHONG66166 9c0142e
Add step to install OS environment
dvrogozh 1e4d7df
Use actions/cheсkout to download transformers
dvrogozh 067cdd9
Add env variable for python version
dvrogozh 2d22174
Add dedicated versions reporting step
dvrogozh 59db2bb
Add TRANSFORMERS_TEST_DEVICE_SPEC to workflow env vars
dvrogozh 10bc574
Do not save logs from pytest to file
dvrogozh 91301cf
Drop tests_trainer_not_ray
dvrogozh dfcff7b
Drop all transformer tests but one
dvrogozh 87de5fa
Add PR trigger
dvrogozh 8863a94
Install XPU PyTorch first
dvrogozh a7979df
Add sanity checks of torch version
dvrogozh aef2f47
Rename log file
dvrogozh 6e01ae8
Drop not needed packages
dvrogozh 97c1c82
[TEST][TO DEV BRANCH] Add fixes for transformers test (#1177)
RUIJIEZHONG66166 fdc7741
move ondemand test to transformer workflow
RUIJIEZHONG66166 2fb9b1d
update workflow_dispatch set
RUIJIEZHONG66166 298b09c
solve input type issue
RUIJIEZHONG66166 dec58de
update workflow_call to worfkflow_dispatch
RUIJIEZHONG66166 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
paths: | ||
- '.github/scripts/spec.py' | ||
- '.github/workflows/_linux_transformers.yml' | ||
workflow_call: | ||
workflow_dispatch: | ||
inputs: | ||
pytorch: | ||
required: false | ||
|
@@ -39,6 +39,11 @@ on: | |
type: string | ||
default: 'v4.47.0' | ||
description: Transformers version | ||
transformers_test: | ||
required: true | ||
type: string | ||
default: '' | ||
description: Test scope. `test_py,benchmark,generation,models,pipelines,trainer,utils,backbone,trainer_not_ray` Delimiter is comma | ||
|
||
permissions: read-all | ||
|
||
|
@@ -125,6 +130,38 @@ jobs: | |
source activate huggingface_transformers_test | ||
cd transformers | ||
python3 -m pytest -rsf --make-reports=tests_benchmark -k backbone tests | ||
# On-demand launch | ||
- name: OnDemand Test (${transformers_test}) | ||
if: github.event_name == 'workflow_dispatch' | ||
run: | | ||
source activate huggingface_transformers_test | ||
cd transformers | ||
|
||
# check param | ||
function contains() { | ||
contains_status="echo 'Start $2 ...'" | ||
{ | ||
[[ $1 =~ (^|,)$2($|,) ]] | ||
} || { | ||
echo "[Warning] $2 is not suppotted type! Skipped!" | ||
contains_status="continue" | ||
} | ||
} | ||
set -xe | ||
for transformers_test in $(echo ${{ input.transformers_test }} |sed 's/,/ /g') | ||
do | ||
contains "test_py,benchmark,generation,models,pipelines,trainer,utils,backbone,trainer_not_ray" $transformers_test | ||
$contains_status | ||
if [ "${transformers_test}" == "test_py" ];then | ||
python3 -m pytest -rsf --make-reports=tests_py tests/*.py | ||
elif [ "${transformers_test}" == "trainer_not_ray" ];then | ||
python3 -m pytest -rsf --make-reports=tests_trainer_not_ray -k "not ray" tests/trainer | ||
elif [ "${transformers_test}" == "backbone" ];then | ||
python3 -m pytest -rsf --make-reports=tests_backbone -k backbone tests | ||
else | ||
python3 -m pytest -rsf --make-reports=tests_${transformers_test} tests/${transformers_test} | ||
fi | ||
done | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop this. As we agreed - let's do any additional tests on a follow up commit. Basically limit this change to just |
||
- name: Upload Test log | ||
if: ${{ ! cancelled() }} | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this. Let's focus on a single test -
backbone
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, drop
transformers_test
. We will most likely rework how to setup test scope.