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

Output warning before changing n_jobs value #1114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion umap/umap_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,8 +1941,8 @@ def _dist_only(x, y, *kwds):
if self.n_jobs < -1 or self.n_jobs == 0:
raise ValueError("n_jobs must be a postive integer, or -1 (for all cores)")
if self.n_jobs != 1 and self.random_state is not None:
self.n_jobs = 1
warn(f"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.")
self.n_jobs = 1

if self.dens_lambda < 0.0:
raise ValueError("dens_lambda cannot be negative")
Expand Down
Loading