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

Too many processes started #566

Open
mdbenito opened this issue Apr 19, 2024 · 0 comments · May be fixed by #558
Open

Too many processes started #566

mdbenito opened this issue Apr 19, 2024 · 0 comments · May be fixed by #558
Labels
bug Something isn't working
Milestone

Comments

@mdbenito
Copy link
Collaborator

This code uses all cores in my machine, despite setting n_jobs=1. Since we are ditching the whole parallel backend abstraction this will probably disappear, but I thought it best to report it anyway.

from sklearn.datasets import load_breast_cancer
from sklearn.linear_model import LogisticRegression

from pydvl.utils import Dataset, Scorer, Utility
from pydvl.value import (MaxUpdates, RelativeTruncation,
                         permutation_montecarlo_shapley)

data = Dataset.from_sklearn(
  load_breast_cancer(),
  train_size=10,
  stratify_by_target=True,
  random_state=16,
  )
model = LogisticRegression(n_jobs=1)
u = Utility(
  model,
  data,
  Scorer("accuracy", default=0.0)
  )
values = permutation_montecarlo_shapley(
  u,
  truncation=RelativeTruncation(u, 0.05),
  done=MaxUpdates(1000),
  seed=16,
  n_jobs=1,
  progress=True
  )
df = values.to_dataframe(column="data_value")
@mdbenito mdbenito added the bug Something isn't working label Apr 19, 2024
@mdbenito mdbenito added this to the v0.10.0 milestone May 3, 2024
@schroedk schroedk linked a pull request May 13, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant