How to use the threadpoolctl._ThreadpoolInfo.todicts function in threadpoolctl

To help you get started, we’ve selected a few threadpoolctl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joblib / threadpoolctl / threadpoolctl.py View on Github external
def threadpool_info():
    """Return the maximal number of threads for each detected library.

    Return a list with all the supported modules that have been found. Each
    module is represented by a dict with the following information:

      - "user_api" : user API. Possible values are {USER_APIS}.
      - "internal_api": internal API. Possible values are {INTERNAL_APIS}.
      - "prefix" : filename prefix of the specific implementation.
      - "filepath": path to the loaded module.
      - "version": version of the library (if available).
      - "num_threads": the current thread limit.

    In addition, each module may contain internal_api specific entries.
    """
    return _ThreadpoolInfo(user_api=_ALL_USER_APIS).todicts()