Skip to content

Conversation

@AndreaBozzo
Copy link

Fixes #3129

Summary

The type hint for to_tensor_fn in LanceDataset.__init__ incorrectly declared a single-argument callable, but the function is called with additional keyword arguments.

Changes

  • Updated type hint from Callable[[pa.RecordBatch], ...] to Callable[..., ...] to accurately reflect that the function accepts arbitrary arguments
  • Enhanced docstring to document the expected signature with optional hf_converter and use_blob_api keyword arguments

Testing

  • Verified Python syntax compilation passes
  • No functional changes, only type hint correction

Fixes lance-format#3129

The type hint for  in  was
declaring a single-argument callable, but the function is actually
called with additional keyword arguments ( and
).

Changes:
- Update type hint to use  to allow arbitrary args
- Enhance docstring to document the expected function signature
@github-actions github-actions bot added bug Something isn't working python labels Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lance.torch.data.LanceDataset(to_tensor_fn=...) typehint inconsistent with usage.

1 participant