Skip to content

Commit

Permalink
fix yapf scan issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ftian1 committed May 9, 2023
1 parent 9887965 commit 2f2cfc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/compression/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
except ImportError as e:
nc = None


def check_deepspeed_config(config):
if isinstance(config, dict):
return config
Expand Down Expand Up @@ -126,7 +127,6 @@ def init_compression(model, deepspeed_config, teacher_model=None, mpu=None):
if shared_parameters[SPARSE_PRUNING_ENABLED] and \
shared_parameters[SPARSE_PRUNING_METHOD] == SPARSE_PRUNING_METHOD_SNIP_MOMENTUM:


assert nc is not None, "please ensure the neural_compressor python package is installed by pip or conda if user wants to use snip_momentum sparse pruning"

from .helper import generate_pruners, register_on_step_begin
Expand Down

0 comments on commit 2f2cfc4

Please sign in to comment.