Skip to content

Commit faed008

Browse files
authored
Merge branch 'main' into fix-modules-no-convert-torchao
2 parents ed734a0 + 2843b3d commit faed008

File tree

806 files changed

+20727
-17904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

806 files changed

+20727
-17904
lines changed

.github/workflows/notify_slack_about_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Python
1616
uses: actions/setup-python@v6
1717
with:
18-
python-version: '3.8'
18+
python-version: '3.10'
1919

2020
- name: Notify Slack about the release
2121
env:

.github/workflows/pr_dependency_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.8"
25+
python-version: "3.10"
2626
- name: Install dependencies
2727
run: |
2828
pip install -e .

.github/workflows/pr_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Python
3636
uses: actions/setup-python@v6
3737
with:
38-
python-version: "3.8"
38+
python-version: "3.10"
3939
- name: Install dependencies
4040
run: |
4141
pip install --upgrade pip
@@ -55,7 +55,7 @@ jobs:
5555
- name: Set up Python
5656
uses: actions/setup-python@v6
5757
with:
58-
python-version: "3.8"
58+
python-version: "3.10"
5959
- name: Install dependencies
6060
run: |
6161
pip install --upgrade pip

.github/workflows/pr_tests_gpu.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Python
3737
uses: actions/setup-python@v6
3838
with:
39-
python-version: "3.8"
39+
python-version: "3.10"
4040
- name: Install dependencies
4141
run: |
4242
pip install --upgrade pip
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Python
5757
uses: actions/setup-python@v6
5858
with:
59-
python-version: "3.8"
59+
python-version: "3.10"
6060
- name: Install dependencies
6161
run: |
6262
pip install --upgrade pip
@@ -199,6 +199,11 @@ jobs:
199199

200200
- name: Install dependencies
201201
run: |
202+
# Install pkgs which depend on setuptools<81 for pkg_resources first with no build isolation
203+
uv pip install pip==25.2 setuptools==80.10.2
204+
uv pip install --no-build-isolation k-diffusion==0.0.12
205+
uv pip install --upgrade pip setuptools
206+
# Install the rest as normal
202207
uv pip install -e ".[quality]"
203208
uv pip install peft@git+https://github.com/huggingface/peft.git
204209
uv pip uninstall accelerate && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git

.github/workflows/pr_torch_dependency_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.8"
25+
python-version: "3.10"
2626
- name: Install dependencies
2727
run: |
2828
pip install -e .

.github/workflows/push_tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ jobs:
126126

127127
- name: Install dependencies
128128
run: |
129+
# Install pkgs which depend on setuptools<81 for pkg_resources first with no build isolation
130+
uv pip install pip==25.2 setuptools==80.10.2
131+
uv pip install --no-build-isolation k-diffusion==0.0.12
132+
uv pip install --upgrade pip setuptools
133+
# Install the rest as normal
129134
uv pip install -e ".[quality]"
130135
uv pip install peft@git+https://github.com/huggingface/peft.git
131136
uv pip uninstall accelerate && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git

.github/workflows/pypi_publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: '3.8'
23+
python-version: '3.10'
2424

2525
- name: Fetch latest branch
2626
id: fetch_latest_branch
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Python
4848
uses: actions/setup-python@v6
4949
with:
50-
python-version: "3.8"
50+
python-version: "3.10"
5151

5252
- name: Install dependencies
5353
run: |

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Python
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.8
23+
python-version: 3.10
2424

2525
- name: Install requirements
2626
run: |

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
agreed to in writing, Licensor provides the Work (and each
145145
Contributor provides its Contributions) on an "AS IS" BASIS,
146146
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147-
implied, including, without limitation, any warranties or conditions
147+
implied, including, without limitation, Any warranties or conditions
148148
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149149
PARTICULAR PURPOSE. You are solely responsible for determining the
150150
appropriateness of using or redistributing the Work and assume any

benchmarks/benchmarking_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import threading
77
from contextlib import nullcontext
88
from dataclasses import dataclass
9-
from typing import Any, Callable, Dict, Optional, Union
9+
from typing import Any, Callable
1010

1111
import pandas as pd
1212
import torch
@@ -91,10 +91,10 @@ def model_init_fn(model_cls, group_offload_kwargs=None, layerwise_upcasting=Fals
9191
class BenchmarkScenario:
9292
name: str
9393
model_cls: ModelMixin
94-
model_init_kwargs: Dict[str, Any]
94+
model_init_kwargs: dict[str, Any]
9595
model_init_fn: Callable
9696
get_model_input_dict: Callable
97-
compile_kwargs: Optional[Dict[str, Any]] = None
97+
compile_kwargs: dict[str, Any] | None = None
9898

9999

100100
@require_torch_gpu
@@ -176,7 +176,7 @@ def run_benchmark(self, scenario: BenchmarkScenario):
176176
result["fullgraph"], result["mode"] = None, None
177177
return result
178178

179-
def run_bencmarks_and_collate(self, scenarios: Union[BenchmarkScenario, list[BenchmarkScenario]], filename: str):
179+
def run_bencmarks_and_collate(self, scenarios: BenchmarkScenario | list[BenchmarkScenario], filename: str):
180180
if not isinstance(scenarios, list):
181181
scenarios = [scenarios]
182182
record_queue = queue.Queue()
@@ -214,10 +214,10 @@ def _run_phase(
214214
*,
215215
model_cls: ModelMixin,
216216
init_fn: Callable,
217-
init_kwargs: Dict[str, Any],
217+
init_kwargs: dict[str, Any],
218218
get_input_fn: Callable,
219-
compile_kwargs: Optional[Dict[str, Any]],
220-
) -> Dict[str, float]:
219+
compile_kwargs: dict[str, Any] | None = None,
220+
) -> dict[str, float]:
221221
# setup
222222
self.pre_benchmark()
223223

0 commit comments

Comments
 (0)