Skip to content

Conversation

@faysalkhan8p
Copy link

No description provided.

@faysalkhan8p
Copy link
Author

Now the seed uses rank


def inside_circle(total_count):

np.random.seed(2022*rank)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you now resetting the seed here every time the function is called? A rank specific seed is indeed necessary...perhaps this deserves an explanatory comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function is only called once. Would it be clearer if the seed is set once the rank has been determined, for example on line 9?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be the right thing to do, there are two subtle things going on that should be clarified in a comment (or in the lesson?): you only set the seed once in your application, and the seed of each rank should be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants