Multihreaded library inside ray actor

When I use numpy inside a ray actor, I notice that the numpy becomes single-core.

Is this expected behavior? When I use my numpy distribution in just Python I observe multi-core.

Is there a minimum script that can reproduce the behavior?

I discovered I can solve this problem by explicitly setting mkl.set_num_threads right before calling the numpy routine. I think there are some problems with default OS environ values inside ray actors

Hi @marsupialtail,

I think that is intentional.

1 Like