Skip to content

Commit

Permalink
[F] Fix pylint error
Browse files Browse the repository at this point in the history
  • Loading branch information
kunkunlin1221 committed Dec 21, 2024
1 parent c3cc3f6 commit ea95495
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ enable=
E0601,E0602,E0603,E0604,E0611,
E0632,E0633,E0701,E0702,E0703,
E0704,E0710,E0711,E0712,E1003,
#E1102,
; #E1102,
E1111,E1120,E1121,E1123,
E1124,E1125,E1126,E1127,E1128,
E1129,E1130,E1131,E1132,E1133,
Expand Down
4 changes: 2 additions & 2 deletions chameleon/tools/calflops/calculate_pipline.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def flops_repr(module):
return ", ".join(items)

def add_extra_repr(module):
flops_extra_repr = flops_repr.__get__(module)
flops_extra_repr = flops_repr(module)
if module.extra_repr != flops_extra_repr:
module.original_extra_repr = module.extra_repr
module.extra_repr = flops_extra_repr
Expand Down Expand Up @@ -349,7 +349,7 @@ def flops_repr(module):
return ", ".join(items)

def add_extra_repr(module):
flops_extra_repr = flops_repr.__get__(module)
flops_extra_repr = flops_repr(module)
if module.extra_repr != flops_extra_repr:
module.original_extra_repr = module.extra_repr
module.extra_repr = flops_extra_repr
Expand Down
6 changes: 3 additions & 3 deletions chameleon/tools/calflops/flops_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ def calculate_flops(model,
params = calculate_flops_pipline.get_total_params()

if print_results:
return_print = calculate_flops_pipline.print_model_pipline(units=output_unit,
precision=output_precision,
print_detailed=print_detailed)
calculate_flops_pipline.print_model_pipline(units=output_unit,
precision=output_precision,
print_detailed=print_detailed)

calculate_flops_pipline.end_flops_calculate()

Expand Down

0 comments on commit ea95495

Please sign in to comment.