Skip to content

Commit

Permalink
specify CPU device in warm_up test (#7014)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Feb 16, 2024
1 parent b552b0b commit 44b5ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/components/audio/test_whisper_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_from_dict(self):

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"))
Expand Down

0 comments on commit 44b5ae2

Please sign in to comment.