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] Make it possible to set limits from already loaded modules #38

Closed
wants to merge 12 commits into from

Conversation

jeremiedbb
Copy link
Collaborator

Use case is the following:

infos = threadpool_info(return_api=True)

# create a python threadpool e.g. with joblib threading backend
joblib.Parallel(backend='threading', n_jobs=88)(
    with threadpool_limits(limit, user_api, infos=infos):
        <some function>
)

Proposed api:

  • add a parameter to threadpool_info to return the set_num_threads and get_num_threads functions
  • add a parameter to threadpool_limits to accept already loaded modules instead of finding them again.

todo:

  • lots of tests :)
  • update docstrings

@jeremiedbb
Copy link
Collaborator Author

The use-case is not achievable. Closing.

@ogrisel
Copy link
Contributor

ogrisel commented Sep 28, 2021

This was implemented in #95 although for another use case.

@ogrisel ogrisel closed this Sep 28, 2021
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