mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 03:57:19 +00:00
specify CPU device in warm_up test (#7014)
This commit is contained in:
parent
b552b0b37c
commit
44b5ae291c
@ -71,7 +71,7 @@ class TestLocalWhisperTranscriber:
|
||||
|
||||
def test_warmup(self):
|
||||
with patch("haystack.components.audio.whisper_local.whisper") as mocked_whisper:
|
||||
transcriber = LocalWhisperTranscriber(model="large-v2")
|
||||
transcriber = LocalWhisperTranscriber(model="large-v2", device=ComponentDevice.from_str("cpu"))
|
||||
mocked_whisper.load_model.assert_not_called()
|
||||
transcriber.warm_up()
|
||||
mocked_whisper.load_model.assert_called_once_with("large-v2", device=torch.device(type="cpu"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user