diff --git a/depthcharge/data/spectrum_datasets.py b/depthcharge/data/spectrum_datasets.py index 1944ea9..5722079 100644 --- a/depthcharge/data/spectrum_datasets.py +++ b/depthcharge/data/spectrum_datasets.py @@ -9,7 +9,7 @@ from os import PathLike from pathlib import Path from tempfile import TemporaryDirectory -from typing import Any +from typing import Any, Optional import lance import polars as pl @@ -239,6 +239,7 @@ def from_lance( def _to_tensor( self, batch: pa.RecordBatch, + hf_converter: Optional[Any] = None, ) -> dict[str, torch.Tensor | list[str | torch.Tensor]]: """Convert a record batch to tensors. @@ -246,6 +247,8 @@ def _to_tensor( ---------- batch : pyarrow.RecordBatch The batch of data. + hf_converter : Optional[Any] + Does nothing; added to maintain compatibility with pylance Returns ------- @@ -351,6 +354,7 @@ def __init__( def _to_tensor( self, batch: pa.RecordBatch, + hf_converter : Optional[Any] = None, ) -> dict[str, torch.Tensor | list[str | torch.Tensor]]: """Convert a record batch to tensors. @@ -358,7 +362,9 @@ def _to_tensor( ---------- batch : pyarrow.RecordBatch The batch of data. - + hf_converter : Optional[Any] + Does nothing; added to maintain compatibility with pylance + Returns ------- dict of str to tensors or lists