Closed ducva closed 7 years ago
TL;DR Problem caused by module running code on import that doesn't play well with multiple instances of itself running. Suggested fix in PR here to not run that code at import time.
When I first saw this, I wondered if it was something with threads. Does running green on a single thread fix this?
green -s 1 test.py
@MinchinWeb No, because that only means a single worker process. You still have the main process that imports all the libraries to decide how they should be distributed to workers, and since the bug was caused by run-at-import issues, the import in the main process and the import of any worker process (including just a single one) would collide.
There are other classes of behavior problems that can be avoided by just using a single worker process, but not this particular one.
@CleanCut Thanks for the explanation!
Any time. 😎
I created sample project at
green_tensorflow_bug Repository
For now, I can't use green to run my unit test with Tensorflow.
Run test with green:
green test.py
Run test with python
python test.py
Please help!