py-why / py-why/EconML

Performance deterioration with greater number of cores

Open
#626 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Description

I am fitting a CausalForestDML model on an Azure Machine Learning compute instance with 32 cores. My dataset has ~3 million records and ~60 variables.
Surprisingly, fitting speed decreases with a greater number of cores. For instance, a model with n_jobs=-1 (i.e. all 32) cores runs slower than a model with n_jobs=12, which in turn runs slower than a model with n_jobs=6 (see attached images).

6core 12core 32core

I am using the standard threading backend. Given the low overhead nature of threading, I am a little puzzled why parallelization would decrease fitting speed.
I would be glad to get any insight regarding this behavior. Has anyone else experienced this issue? Could this have something to do with the compute instance itself?

Compute instance:

  • Standard_F32s_v2 (32 cores, 64 GB RAM, 265 GB disk) details here

Environment:

  • Linux, Ubuntu 18.04
  • Python 3.8.10
  • EconML 0.12.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reproducing CausalForestDML fitting on the stated Azure instance with n_jobs set to 6, 12, and -1, using the standard threading backend and the reported environment. Done means the differing timings are explained and a concrete reproduction or next step is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.