Skip to content

Commit

Permalink
add warning comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 5, 2024
1 parent 33f0ec7 commit d5c7b2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vision_agent/utils/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5c7b2a

Please sign in to comment.