[Bloom] Fix hangs of bloom test (#7890)
`test_checkpoint_sharding.py::TestCheckpointShard::test[bigscience/bloom-560m-fp16]`
silently hangs if incorrect version of transformers(>4.43.4) is
installed, due to no proper handling of SystemExit in the pool worker.
Fix is throw RuntimeError instead of sys.exit.
* Test:
Run `pytest tests/unit/inference/test_checkpoint_sharding.py -k
'bloom-560m-fp16'`
* Result: no hangs, throw exception:
```
E RuntimeError: Transformers version 4.57.3 exceeds version 4.43.4! After transformers version 4.43.4, BLOOM inference with DeepSpeed is no longer supported.
/usr/lib/python3.12/multiprocessing/pool.py:774: RuntimeError
```
Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>