Update !
just out of curiosity I ran the same exact code in jupyter notebook with num_workers=6 and it works just fine. I was initially running my code using pycharm with an an anaconda environment as python interpreter.   What could be the issue?