mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[CI] Add gitleaks check (#2101)
This commit is contained in:
parent
3d1760aba2
commit
6f3b6a5d12
@ -115,9 +115,15 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --root_folder
|
- --root_folder
|
||||||
- opencompass/configs/datasets
|
- opencompass/configs/datasets
|
||||||
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
|
rev: v8.23.1
|
||||||
|
hooks:
|
||||||
|
- id: gitleaks
|
||||||
|
entry: "gitleaks dir"
|
||||||
|
args: ["--verbose", "--redact=50"]
|
||||||
# - repo: https://github.com/open-mmlab/pre-commit-hooks
|
# - repo: https://github.com/open-mmlab/pre-commit-hooks
|
||||||
# rev: v0.2.0 # Use the ref you want to point at
|
# rev: v0.2.0 # Use the ref you want to point at
|
||||||
# hooks:
|
# hooks:
|
||||||
# - id: check-algo-readme
|
# - id: check-algo-readme
|
||||||
# - id: check-copyright
|
# - id: check-copyright
|
||||||
# args: ["mmocr", "tests", "tools"] # these directories will be checked
|
# args: ["mmocr", "tests", "tools"] # these directories will be checked
|
||||||
|
@ -116,9 +116,15 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --root_folder
|
- --root_folder
|
||||||
- opencompass/configs/datasets
|
- opencompass/configs/datasets
|
||||||
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
|
rev: v8.23.1
|
||||||
|
hooks:
|
||||||
|
- id: gitleaks
|
||||||
|
entry: "gitleaks dir"
|
||||||
|
args: ["--verbose", "--redact=50"]
|
||||||
# - repo: https://github.com/open-mmlab/pre-commit-hooks
|
# - repo: https://github.com/open-mmlab/pre-commit-hooks
|
||||||
# rev: v0.2.0 # Use the ref you want to point at
|
# rev: v0.2.0 # Use the ref you want to point at
|
||||||
# hooks:
|
# hooks:
|
||||||
# - id: check-algo-readme
|
# - id: check-algo-readme
|
||||||
# - id: check-copyright
|
# - id: check-copyright
|
||||||
# args: ["mmocr", "tests", "tools"] # these directories will be checked
|
# args: ["mmocr", "tests", "tools"] # these directories will be checked
|
||||||
|
@ -75,7 +75,7 @@ class GLM130B(BaseModel):
|
|||||||
['--vocab-size', '150528'],
|
['--vocab-size', '150528'],
|
||||||
['--num-attention-heads', '96'],
|
['--num-attention-heads', '96'],
|
||||||
['--max-sequence-length', '2048'],
|
['--max-sequence-length', '2048'],
|
||||||
['--tokenizer-type', 'icetk-glm-130B'],
|
['--tokenizer-type', 'icetk-glm-130B'], #gitleaks:allow
|
||||||
['--layernorm-order', 'post'],
|
['--layernorm-order', 'post'],
|
||||||
['--load', self.ckpt_path],
|
['--load', self.ckpt_path],
|
||||||
['--skip-init'],
|
['--skip-init'],
|
||||||
|
@ -358,7 +358,7 @@ class InternTrain(BaseModel):
|
|||||||
output_text = self.batch_decode(
|
output_text = self.batch_decode(
|
||||||
outputs,
|
outputs,
|
||||||
eos_token_ids=self.generator.eos_token_id,
|
eos_token_ids=self.generator.eos_token_id,
|
||||||
stopping_criteria=stopping_criteria)
|
stopping_criteria=stopping_criteria) #gitleaks:allow
|
||||||
|
|
||||||
return output_text
|
return output_text
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user