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

WIP: Adding seed to the random number generation to allow reproducibility #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kumaranu
Copy link

This PR is to put allow the user to provide random seed values to keep the results consistent while testing.

There are two instances of random number generation in the code:

  1. geodesic_interpolate/interpolation.py
  2. geodesic_interpolate/coord_utils.py

The goal here is to only provide the seed value when the user wants to.

…in the code. This will make the results reproducible.
Copy link
Owner

@virtualzx-nad virtualzx-nad left a comment

Choose a reason for hiding this comment

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

Thanks for adding reproducibility support! A few suggestions:

  1. Consider using a single --seed parameter instead of two separate ones. The package can internally derive different seeds for different functions if needed.

  2. The help text could be more concise, e.g.:

    ps.add_argument("--seed", type=int, help="Random seed for reproducible results")
  3. The implementation part is missing - need to pass these seeds to the respective functions and set numpy's random seed.


Review by Augment, approved by user.

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.

2 participants