Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions videoprism/tokenizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def to_int_tf_op(
A tf.Tensor or tf.RaggedTensor of tokens.
"""
text = tf.convert_to_tensor(text)
if text.ndim == 0:
if text.ndim == 0: # pyrefly: ignore[missing-attribute]

def fn(txt):
"""Tokenizes a single string."""
Expand All @@ -143,7 +143,7 @@ def fn(txt):
toks = self.to_int(strings, bos=bos, eos=eos)
return tf.ragged.constant(toks)

out_type = tf.RaggedTensorSpec([text.shape[0], None], tf.int32)
out_type = tf.RaggedTensorSpec([text.shape[0], None], tf.int32) # pyrefly: ignore[missing-attribute]
return tf.py_function(fn, [text], Tout=out_type)

@property
Expand Down
Loading