(
self,
media_chunks: Sequence["MTMDProcessor.MediaChunk"],
)
| 10919 | mtmd_cpp.mtmd_batch_free(batch) |
| 10920 | |
| 10921 | def _encode_media_chunks( |
| 10922 | self, |
| 10923 | media_chunks: Sequence["MTMDProcessor.MediaChunk"], |
| 10924 | ) -> None: |
| 10925 | uncached = [ |
| 10926 | media_chunk |
| 10927 | for media_chunk in media_chunks |
| 10928 | if not self._load_cached_media_chunk(media_chunk) |
| 10929 | ] |
| 10930 | index = 0 |
| 10931 | while index < len(uncached): |
| 10932 | index += self._encode_media_batch(uncached, index) |
| 10933 | |
| 10934 | def _positions_for_chunk(self, chunk: Any, start_pos: int) -> np.ndarray: |
| 10935 | n_tokens = int(mtmd_cpp.mtmd_input_chunk_get_n_tokens(chunk)) |
no test coverage detected