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

Set global R seed inside R/setup.R #77

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

dfsnow
Copy link
Member

@dfsnow dfsnow commented Dec 30, 2024

Sets the global R seed for use in the Tidymodels CV loop and KNN resampling. Does not affect the RNG of the model (LightGBM) itself. Tested by running two runs in a row and checking the DVC lockfile after each run (only the timing outputs changed).

Setting the global seed to control Tidymodels RNG didn't work in the past. They must have updated the tune library at some point to respect set.seed().

Fixes #61.

@dfsnow dfsnow marked this pull request as ready for review December 30, 2024 16:29
Copy link
Contributor

@jeancochrane jeancochrane left a comment

Choose a reason for hiding this comment

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

Nice!

@dfsnow dfsnow merged commit 1533303 into 2025-assessment-year Dec 30, 2024
4 checks passed
@dfsnow dfsnow deleted the dfsnow/fix-determinism branch December 30, 2024 17:41
Damonamajor pushed a commit that referenced this pull request Jan 14, 2025
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.

Make model deterministic
2 participants