Skip to content

Commit

Permalink
Whisper pipeline: cache models in python tests (#1389)
Browse files Browse the repository at this point in the history
Ticket: 159277
  • Loading branch information
as-suvorov authored Dec 19, 2024
1 parent 17f4eb3 commit e1f910d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/python_tests/test_whisper_generate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def run_gc_after_test():
yield
gc.collect()

@functools.lru_cache(1)
# used whisper models are relatively small
# cache them in memory to speedup tests
@functools.lru_cache(3)
def read_whisper_model(params, **tokenizer_kwargs):
model_id, path = params

Expand Down

0 comments on commit e1f910d

Please sign in to comment.