Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup][C-1] Replace Program.random_seed #61902

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/legacy_test/dist_allreduce_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
paddle.dataset.mnist.fetch()

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


def cnn_model(data):
Expand Down
3 changes: 1 addition & 2 deletions test/legacy_test/dist_ctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
os.environ['PADDLE_ENABLE_REMOTE_PREFETCH'] = "1"

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


class TestDistCTR2x2(TestDistRunnerBase):
Expand Down
3 changes: 1 addition & 2 deletions test/legacy_test/dist_fleet_ctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
paddle.enable_static()

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


def fake_ctr_reader():
Expand Down
3 changes: 1 addition & 2 deletions test/legacy_test/dist_fleet_ctr_ps_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
from paddle import base

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


class TestDistGpuPsCTR2x2(TestDistCTR2x2):
Expand Down
3 changes: 1 addition & 2 deletions test/legacy_test/dist_fleet_heter_pipeline_ctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
paddle.enable_static()

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


class TestHeterPipelinePsCTR2x2(FleetDistHeterRunnerBase):
Expand Down