Skip to content

Commit 78a9870

Browse files
authored
fix bad super call (#33533)
1 parent b4f8287 commit 78a9870

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

python/paddle/distributed/entry_attr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class ProbabilityEntry(EntryAttr):
8282
"""
8383

8484
def __init__(self, probability):
85-
super(EntryAttr, self).__init__()
85+
super(ProbabilityEntry, self).__init__()
8686

8787
if not isinstance(probability, float):
8888
raise ValueError("probability must be a float in (0,1)")
@@ -122,7 +122,7 @@ class CountFilterEntry(EntryAttr):
122122
"""
123123

124124
def __init__(self, count_filter):
125-
super(EntryAttr, self).__init__()
125+
super(CountFilterEntry, self).__init__()
126126

127127
if not isinstance(count_filter, int):
128128
raise ValueError(

python/paddle/fluid/entry_attr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _to_attr(self):
4040

4141
class ProbabilityEntry(EntryAttr):
4242
def __init__(self, probability):
43-
super(EntryAttr, self).__init__()
43+
super(ProbabilityEntry, self).__init__()
4444

4545
if not isinstance(probability, float):
4646
raise ValueError("probability must be a float in (0,1)")
@@ -57,7 +57,7 @@ def _to_attr(self):
5757

5858
class CountFilterEntry(EntryAttr):
5959
def __init__(self, count_filter):
60-
super(EntryAttr, self).__init__()
60+
super(CountFilterEntry, self).__init__()
6161

6262
if not isinstance(count_filter, int):
6363
raise ValueError(

python/paddle/fluid/incubate/fleet/base/role_maker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ class GeneralRoleMaker(RoleMakerBase):
591591
"""
592592

593593
def __init__(self, **kwargs):
594-
super(RoleMakerBase, self).__init__()
594+
super(GeneralRoleMaker, self).__init__()
595595
self._role_is_generated = False
596596
self._hdfs_name = kwargs.get("hdfs_name", "")
597597
self._hdfs_ugi = kwargs.get("hdfs_ugi", "")

python/paddle/fluid/tests/unittests/mkldnn/test_conv2d_transpose_mkldnn_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def init_test_case(self):
134134

135135
class TestMKLDNNWithValidPad_NHWC(TestMKLDNNWithValidPad):
136136
def init_test_case(self):
137-
super(TestMKLDNNWithValidPad, self).init_test_case()
137+
super(TestMKLDNNWithValidPad_NHWC, self).init_test_case()
138138
self.data_format = "NHWC"
139139
N, C, H, W = self.input_size
140140
self.input_size = [N, H, W, C]

python/paddle/fluid/tests/unittests/test_backward.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _check_error_no_grad_set(self, net, no_grad_set):
160160

161161
class SimpleNet(BackwardNet):
162162
def __init__(self):
163-
super(BackwardNet, self).__init__()
163+
super(SimpleNet, self).__init__()
164164
self.stop_gradient_grad_vars = set([
165165
u'x_no_grad@GRAD', u'x2_no_grad@GRAD', u'x3_no_grad@GRAD',
166166
u'label_no_grad@GRAD'
@@ -330,7 +330,7 @@ def callback(block, context):
330330
# TODO(Aurelius84): add conditional network test
331331
class ConditionalNet(BackwardNet):
332332
def __init__(self):
333-
super(BackwardNet, self).__init__()
333+
super(ConditionalNet, self).__init__()
334334

335335

336336
if __name__ == '__main__':

python/paddle/fluid/tests/unittests/test_fleet_metric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def setUp(self):
3535

3636
class FakeUtil(UtilBase):
3737
def __init__(self, fake_fleet):
38-
super(UtilBase, self).__init__()
38+
super(FakeUtil, self).__init__()
3939
self.fleet = fake_fleet
4040

4141
def all_reduce(self, input, mode="sum", comm_world="worker"):

python/paddle/fluid/tests/unittests/test_fleet_rolemaker_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class TmpFleet(Fleet):
199199
"""
200200

201201
def __init__(self):
202-
super(Fleet, self).__init__()
202+
super(TmpFleet, self).__init__()
203203
self._role_maker = None
204204

205205
def init_worker(self):

0 commit comments

Comments
 (0)