Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
clinton-encord committed Jan 7, 2025
1 parent f573bf6 commit ac38461
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions encord/objects/classification_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ def feature_hash(self) -> str:
def _last_frame(self) -> Union[int, float]:
if self._parent is None or self._parent.data_type is DataType.DICOM:
return float("inf")
elif self._parent is not None and self._parent.data_type == "text/html":
# For HTML files, the entire file is treated as one frame
# Note: for Audio and Plain Text, classifications must be applied to ALL the "frames"
elif self._parent is not None and not is_geometric(self._parent.data_type):
# For audio and text files, the entire file is treated as one frame
return 1
else:
return self._parent.number_of_frames
Expand Down Expand Up @@ -166,12 +165,8 @@ def _set_for_ranges(
f"Set 'overwrite' parameter to True to override."
)

for range_to_add in ranges_to_add:
self._check_within_range(range_to_add.end)

"""
At this point, this classification instance operates on ranges, NOT on frames.
We therefore leave only FRAME 0 in the map. The frame_data for FRAME 0 will be
For non-geometric files, the frame_data for FRAME 0 will be
treated as the data for the entire classification instance.
"""
self._set_frame_and_frame_data(
Expand Down

0 comments on commit ac38461

Please sign in to comment.