Under invalid CUDA_VISIBLE_DEVICES, context should reset
(self)
| 29 | assert len(res) == 10 |
| 30 | |
| 31 | def test_context_is_removed(self) -> None: |
| 32 | """Under invalid CUDA_VISIBLE_DEVICES, context should reset""" |
| 33 | assert os.environ["CUDA_VISIBLE_DEVICES"] == "-1" |
| 34 | bst = load_pickle(model_path) |
| 35 | config = bst.save_config() |
| 36 | config = json.loads(config) |
| 37 | assert config["learner"]["generic_param"]["device"] == "cpu" |
| 38 | |
| 39 | def test_context_is_preserved(self) -> None: |
| 40 | """Test the device context is preserved after pickling.""" |
nothing calls this directly
no test coverage detected