Skip to content

task: centralize frame-key serialization #3489

Description

@deruyter92

Summary

The PyTorch video-analysis pipeline currently hand-computes frame-key padding
widths in multiple places and stores per-frame outputs under string keys such as
frame0, frame09, or frame00042.

This works, but it is a low-level serialization detail that is easy to get
wrong, e.g. see #3485 where where log10(0) for empty frames raised an
OverflowError.

Motivation

  • Frame-key formatting is an implementation detail, but callers currently need
    to reason about key_str_width.
  • Width calculations are subtle because they depend on the highest frame index,
    not just the total number of frames in an intuitive way.
  • Read/write code should ideally share one canonical frame-key formatter.

Design Goals

  • Centralize all frame-key logic in one place.
  • Preserve the existing on-disk key format for backward compatibility.
  • Reduce duplicate logic across pickle and shelf code paths.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions