diff --git a/example/bert_clue/evaluation.py b/example/bert_clue/evaluation.py index 96e20b1c0df0ac293c1dd1e3c49f5d1bcbd413dd..2d1086236d171a60ca6470eb4c9c2ad76f66f2df 100644 --- a/example/bert_clue/evaluation.py +++ b/example/bert_clue/evaluation.py @@ -82,6 +82,8 @@ def get_dataset(batch_size=1, repeat_count=1, distribute_file=''): ''' get dataset ''' + _ = distribute_file + ds = de.TFRecordDataset([cfg.data_file], cfg.schema_file, columns_list=["input_ids", "input_mask", "segment_ids", "label_ids"]) type_cast_op = C.TypeCast(mstype.int32) diff --git a/example/bert_clue/finetune.py b/example/bert_clue/finetune.py index b81b2c48d3bfed1996a2ae2cac56375e34aaeb0f..d3cd22a3bd6816dc57f0e27d9eab8b2edeef224a 100644 --- a/example/bert_clue/finetune.py +++ b/example/bert_clue/finetune.py @@ -58,6 +58,8 @@ def get_dataset(batch_size=1, repeat_count=1, distribute_file=''): ''' get dataset ''' + _ = distribute_file + ds = de.TFRecordDataset([cfg.data_file], cfg.schema_file, columns_list=["input_ids", "input_mask", "segment_ids", "label_ids"]) type_cast_op = C.TypeCast(mstype.int32) diff --git a/mindspore/nn/layer/quant.py b/mindspore/nn/layer/quant.py index cec0f8aa7e588bffd2e25b3225c38f44c9134582..fe1c0e9f455da0de633284cba3753ce46d9fb856 100644 --- a/mindspore/nn/layer/quant.py +++ b/mindspore/nn/layer/quant.py @@ -208,6 +208,7 @@ class Conv2dBatchNormQuant(Cell): symmetric=False, narrow_range=False): super(Conv2dBatchNormQuant, self).__init__() + _ = dilation self.stride = stride self.conv = P.Conv2D(out_channel=out_channels, kernel_size=kernel_size, diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index 90d448e55ab2bf801b395d43bb370e6f7b5a3c97..a80500c0e6414fc649eb3794e05914aea53b2200 100644 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -2030,7 +2030,7 @@ class OneHot(PrimitiveWithInfer): depth_val = depth['value'] validator.check_integer("depth", depth_val, 0, Rel.GE, self.name) # create new dimension at end if self.axis is -1 - indices_shp.insert(self.axis, depth_val) if self.axis >= 0 else indices_shp.append(depth_val) + _ = indices_shp.insert(self.axis, depth_val) if self.axis >= 0 else indices_shp.append(depth_val) return {'shape': indices_shp, 'dtype': on_value['dtype'], diff --git a/mindspore/train/summary/_event_writer.py b/mindspore/train/summary/_event_writer.py index 4c340d0caf67bd5cba416ad7e1ce39dc4d0df0a8..ae347135f62a7e83dcced3c2dc5618915c5ff09b 100644 --- a/mindspore/train/summary/_event_writer.py +++ b/mindspore/train/summary/_event_writer.py @@ -38,6 +38,7 @@ class EventWriter(Process): def __init__(self, filepath: str, flush_interval: int) -> None: super().__init__() + _ = flush_interval with open(filepath, 'w'): os.chmod(filepath, stat.S_IWUSR | stat.S_IRUSR) self._writer = EventWriter_(filepath)