From d5c7b2aaedff9f91a3a3cd8b6961d0f03f1b1237 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Thu, 5 Sep 2024 10:06:14 -0700 Subject: [PATCH] add warning comment --- vision_agent/utils/video.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vision_agent/utils/video.py b/vision_agent/utils/video.py index a5b9751d..cbd6d6ac 100644 --- a/vision_agent/utils/video.py +++ b/vision_agent/utils/video.py @@ -76,6 +76,10 @@ def frames_to_bytes( return buffer_bytes +# WARNING: this cache is cache is a little dangerous because if the underlying video +# contents change but the filename remains the same it will return the old file contents +# but for vision agent it's unlikely to change the file contents while keeping the +# same file name and the time savings are very large. @lru_cache(maxsize=8) def extract_frames_from_video( video_uri: str, fps: float = 1.0