mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-24 10:24:35 +00:00
ci : reduce severity of unused Pyright ignore comments (#9697)
This commit is contained in:
parent
08a43d05b6
commit
511636df0c
4
.github/workflows/python-type-check.yml
vendored
4
.github/workflows/python-type-check.yml
vendored
@ -4,11 +4,13 @@ on:
|
|||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/python-type-check.yml'
|
- '.github/workflows/python-type-check.yml'
|
||||||
|
- 'pyrightconfig.json'
|
||||||
- '**.py'
|
- '**.py'
|
||||||
- '**/requirements*.txt'
|
- '**/requirements*.txt'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/python-type-check.yml'
|
- '.github/workflows/python-type-check.yml'
|
||||||
|
- 'pyrightconfig.json'
|
||||||
- '**.py'
|
- '**.py'
|
||||||
- '**/requirements*.txt'
|
- '**/requirements*.txt'
|
||||||
|
|
||||||
@ -33,6 +35,6 @@ jobs:
|
|||||||
- name: Type-check with Pyright
|
- name: Type-check with Pyright
|
||||||
uses: jakebailey/pyright-action@v2
|
uses: jakebailey/pyright-action@v2
|
||||||
with:
|
with:
|
||||||
version: 1.1.370
|
version: 1.1.382
|
||||||
level: warning
|
level: warning
|
||||||
warnings: true
|
warnings: true
|
||||||
|
@ -274,7 +274,7 @@ fout.add_bool("clip.use_gelu", use_gelu)
|
|||||||
|
|
||||||
|
|
||||||
if has_llava_projector:
|
if has_llava_projector:
|
||||||
model.vision_model.encoder.layers.pop(-1) # pyright: ignore[reportAttributeAccessIssue]
|
model.vision_model.encoder.layers.pop(-1)
|
||||||
projector = torch.load(args.llava_projector)
|
projector = torch.load(args.llava_projector)
|
||||||
for name, data in projector.items():
|
for name, data in projector.items():
|
||||||
name = get_tensor_name(name)
|
name = get_tensor_name(name)
|
||||||
@ -288,7 +288,7 @@ if has_llava_projector:
|
|||||||
|
|
||||||
print("Projector tensors added\n")
|
print("Projector tensors added\n")
|
||||||
|
|
||||||
state_dict = model.state_dict() # pyright: ignore[reportAttributeAccessIssue]
|
state_dict = model.state_dict()
|
||||||
for name, data in state_dict.items():
|
for name, data in state_dict.items():
|
||||||
if should_skip_tensor(name, has_text_encoder, has_vision_encoder, has_llava_projector):
|
if should_skip_tensor(name, has_text_encoder, has_vision_encoder, has_llava_projector):
|
||||||
# we don't need this
|
# we don't need this
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
"reportUnusedImport": "warning",
|
"reportUnusedImport": "warning",
|
||||||
"reportDuplicateImport": "error",
|
"reportDuplicateImport": "error",
|
||||||
"reportDeprecated": "warning",
|
"reportDeprecated": "warning",
|
||||||
"reportUnnecessaryTypeIgnoreComment": "warning",
|
"reportUnnecessaryTypeIgnoreComment": "information",
|
||||||
|
"disableBytesTypePromotions": false, // TODO: change once Python 3.12 is the minimum
|
||||||
"executionEnvironments": [
|
"executionEnvironments": [
|
||||||
{
|
{
|
||||||
// TODO: make this version override work correctly
|
// TODO: make this version override work correctly
|
||||||
|
Loading…
Reference in New Issue
Block a user