More consistent stopping of multiprocessing workers
ndiamant opened this issue · comments
Nathaniel Diamant commented
What
Make TensorGenerator
or test_train_valid_generators
a context manager, so that no matter what the multiprocessing workers are always shut down.
Why
It's annoying to manually kill workers if a job fails, and could get in the way of multiple TensorGenerator
jobs.
How
Make TensorGenerator
or test_train_valid_generators
a context manager that manages the workers resource.
Acceptance Criteria
Workers never outlast their TensorGenerator