Skip to content

Commit 07d8907

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 48308a3 commit 07d8907

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

Diff for: applications/ColossalQA/examples/webui_demo/webui.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def restart(chatbot, txt):
8181
)
8282
with gr.Row():
8383
btn = gr.UploadButton("📁", file_types=["file"], file_count="multiple", size="sm")
84-
restart_btn = gr.Button(str("\u21BB"), elem_id="restart-btn", scale=1)
84+
restart_btn = gr.Button(str("\u21bb"), elem_id="restart-btn", scale=1)
8585
txt = gr.Textbox(
8686
scale=8,
8787
show_label=False,
88-
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21BB to clear loaded files and restart chat",
88+
placeholder="Enter text and press enter, or use 📁 to upload files, click \u21bb to clear loaded files and restart chat",
8989
container=True,
9090
autofocus=True,
9191
)

Diff for: colossalai/auto_parallel/tensor_shard/solver/solver.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""This code is adapted from Alpa
2-
https://github.com/alpa-projects/alpa/
3-
with some changes. """
2+
https://github.com/alpa-projects/alpa/
3+
with some changes."""
44

55
import multiprocessing
66
import time

Diff for: colossalai/device/device_mesh.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""This code is adapted from Alpa
2-
https://github.com/alpa-projects/alpa/
3-
with some changes. """
2+
https://github.com/alpa-projects/alpa/
3+
with some changes."""
44

55
import operator
66
from dataclasses import dataclass

Diff for: colossalai/legacy/moe/openmoe/model/modeling_openmoe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
20-
""" PyTorch OpenMoE model."""
20+
"""PyTorch OpenMoE model."""
2121
import math
2222
from typing import List, Optional, Tuple, Union
2323

Diff for: colossalai/nn/layer/layernorm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""This code is from NVIDIA apex:
2-
https://github.com/NVIDIA/apex
3-
with some changes. """
2+
https://github.com/NVIDIA/apex
3+
with some changes."""
44

55
import numbers
66

Diff for: colossalai/nn/optimizer/distributed_galore.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
1+
"""adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
22

33
import warnings
44
from collections import defaultdict

Diff for: colossalai/nn/optimizer/galore.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
1+
"""adapted from https://github.com/jiaweizzhao/GaLore/blob/master/galore_torch/adamw8bit.py"""
22

33
import warnings
44
from typing import List

Diff for: colossalai/shardformer/modeling/chatglm2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" PyTorch ChatGLM model. """
1+
"""PyTorch ChatGLM model."""
22

33
from typing import List, Optional, Tuple
44

Diff for: examples/community/roberta/preprocessing/get_mask.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def __init__(
3434
self.do_whole_word_mask = do_whole_word_mask
3535
self.max_predictions_per_seq = max_predictions_per_seq
3636
self.vocab_words = list(tokenizer.vocab.keys())
37-
self.rec = re.compile("[\u4E00-\u9FA5]")
38-
self.whole_rec = re.compile("##[\u4E00-\u9FA5]")
37+
self.rec = re.compile("[\u4e00-\u9fa5]")
38+
self.whole_rec = re.compile("##[\u4e00-\u9fa5]")
3939

4040
self.mlm_p = 0.15
4141
self.mlm_mask_p = 0.8

Diff for: examples/community/roberta/pretraining/model/deberta_v2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch DeBERTa-v2 model."""
15+
"""PyTorch DeBERTa-v2 model."""
1616

1717
import math
1818
from collections.abc import Sequence

0 commit comments

Comments
 (0)