Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@pimdh

Description

@pimdh

Hi, thanks for creating this amazing library!

There seems to be a small issue with the lance.torch.data.LanceDataset in the to_tensor_fn kwarg of the initializer. Its type hint is:

to_tensor_fn: Optional[
    callable[[pa.RecordBatch], Union[dict[str, torch.Tensor], torch.Tensor]]
] = None,

However, it is called here with an additional kwarg:

batch = self._to_tensor_fn(batch, hf_converter=self._hf_converter)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions