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

[pre-commit.ci] pre-commit autoupdate #6179

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ repos:
args: ['--in-place', '--remove-unused-variables', '--remove-all-unused-imports', '--ignore-init-module-imports']

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
name: sort all imports (python)
args: ["--profile", "black"] # avoid conflict with black

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
name: black formatter
args: ['--line-length=120', '--target-version=py37', '--target-version=py38', '--target-version=py39','--target-version=py310']

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.5
rev: v19.1.7
hooks:
- id: clang-format
name: clang formatter
Expand Down
4 changes: 2 additions & 2 deletions applications/ColossalQA/examples/webui_demo/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def restart(chatbot, txt):
)
with gr.Row():
btn = gr.UploadButton("📁", file_types=["file"], file_count="multiple", size="sm")
restart_btn = gr.Button(str("\u21BB"), elem_id="restart-btn", scale=1)
restart_btn = gr.Button(str("\u21bb"), elem_id="restart-btn", scale=1)
txt = gr.Textbox(
scale=8,
show_label=False,
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21BB to clear loaded files and restart chat",
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21bb to clear loaded files and restart chat",
container=True,
autofocus=True,
)
Expand Down
4 changes: 2 additions & 2 deletions colossalai/auto_parallel/tensor_shard/solver/solver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This code is adapted from Alpa
https://github.com/alpa-projects/alpa/
with some changes. """
https://github.com/alpa-projects/alpa/
with some changes."""

import multiprocessing
import time
Expand Down
4 changes: 2 additions & 2 deletions colossalai/device/device_mesh.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This code is adapted from Alpa
https://github.com/alpa-projects/alpa/
with some changes. """
https://github.com/alpa-projects/alpa/
with some changes."""

import operator
from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion colossalai/legacy/moe/openmoe/model/modeling_openmoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" PyTorch OpenMoE model."""
"""PyTorch OpenMoE model."""
import math
from typing import List, Optional, Tuple, Union

Expand Down
4 changes: 2 additions & 2 deletions colossalai/nn/layer/layernorm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This code is from NVIDIA apex:
https://github.com/NVIDIA/apex
with some changes. """
https://github.com/NVIDIA/apex
with some changes."""

import numbers

Expand Down
2 changes: 1 addition & 1 deletion colossalai/nn/optimizer/distributed_galore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
"""adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""

import warnings
from collections import defaultdict
Expand Down
2 changes: 1 addition & 1 deletion colossalai/nn/optimizer/galore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
"""adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""

import warnings
from typing import List
Expand Down
2 changes: 1 addition & 1 deletion colossalai/shardformer/modeling/chatglm2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" PyTorch ChatGLM model. """
"""PyTorch ChatGLM model."""

from typing import List, Optional, Tuple

Expand Down
4 changes: 2 additions & 2 deletions examples/community/roberta/preprocessing/get_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def __init__(
self.do_whole_word_mask = do_whole_word_mask
self.max_predictions_per_seq = max_predictions_per_seq
self.vocab_words = list(tokenizer.vocab.keys())
self.rec = re.compile("[\u4E00-\u9FA5]")
self.whole_rec = re.compile("##[\u4E00-\u9FA5]")
self.rec = re.compile("[\u4e00-\u9fa5]")
self.whole_rec = re.compile("##[\u4e00-\u9fa5]")

self.mlm_p = 0.15
self.mlm_mask_p = 0.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" PyTorch DeBERTa-v2 model."""
"""PyTorch DeBERTa-v2 model."""

import math
from collections.abc import Sequence
Expand Down