Skip to content

Commit bac08c4

Browse files
committed
Fix some bugs caused by set functions of the Pass class. test=develop
1 parent 4e91d8d commit bac08c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def run_trainer(self, args):
123123
pass_builder = build_stra._finalize_strategy_and_create_passes()
124124
mypass = pass_builder.insert_pass(
125125
len(pass_builder.all_passes()) - 2, "multi_batch_merge_pass")
126-
mypass.set_int("num_repeats", args.batch_merge_repeat)
126+
mypass.set("num_repeats", args.batch_merge_repeat)
127127

128128
if args.update_method == "nccl2":
129129
build_stra.num_trainers = len(args.endpoints.split(","))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_parallel_testing_with_new_strategy(self):
111111

112112
pass_builder.remove_pass(len(pass_builder.all_passes()) - 1)
113113
self.assertEqual(origin_len + 1, len(pass_builder.all_passes()))
114-
viz_pass.set_str("graph_viz_path", "/tmp/test_viz_pass")
114+
viz_pass.set("graph_viz_path", "/tmp/test_viz_pass")
115115

116116
self.check_network_convergence(
117117
use_cuda=core.is_compiled_with_cuda(),

0 commit comments

Comments
 (0)