-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[tests
] add transformers & diffusers integration tests
#962
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: integration tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to test on' | ||
required: true | ||
pytorch_nightly: | ||
description: 'Whether to test integration tests (diffusers + transformers)' | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
run_transformers_integration_tests_main: | ||
runs-on: ubuntu-latest | ||
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. is this powerful enough to run those peft tests? |
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
cache-dependency-path: "setup.py" | ||
- name: print environment variables | ||
run: | | ||
echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}" | ||
echo "env.CI_SHA = ${{ env.CI_SHA }}" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[test] | ||
cd .. && git clone https://github.com/huggingface/transformers.git && cd transformers/ && git log | ||
python -m pip install ".[dev]" | ||
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. it would be great to print the 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. Added it together with printing env variables 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. I think Yih-Dar meant the SHA of the transformers branch, not of PEFT. It is contained in the |
||
|
||
- name: Test transformers integration | ||
run: | | ||
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py | ||
run_transformers_integration_tests_release: | ||
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. How is it controlled that this uses the release, not the latest main? I couldn't find that in the config. Also, there is a lot of duplication with the previous task, depending on how they differ, it might be better to turn this into a test matrix. 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.
for 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. Ah I see, thx. So that should be pretty easy to integrate into a test matrix, WDYT? 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. I think so yes, let me give it a try |
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
cache-dependency-path: "setup.py" | ||
- name: print environment variables | ||
run: | | ||
echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}" | ||
echo "env.CI_SHA = ${{ env.CI_SHA }}" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[test] | ||
cd .. && git clone https://github.com/huggingface/transformers.git && cd transformers/ && git log | ||
|
||
- name: Test transformers integration | ||
run: | | ||
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py | ||
run_diffusers_integration_tests_main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
cache-dependency-path: "setup.py" | ||
- name: print environment variables | ||
run: | | ||
echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}" | ||
echo "env.CI_SHA = ${{ env.CI_SHA }}" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[test] | ||
cd .. && git clone https://github.com/huggingface/diffusers.git && cd diffusers/ && git log | ||
python -m pip install ".[dev]" | ||
|
||
- name: Test diffusers integration | ||
run: | | ||
pytest tests/lora/test_lora_layers_peft.py |
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.
This parameter is not being used, is it? Also, description and parameter name don't fit each other.
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.
Correct, I have simply removed it here