Skip to content

Commit

Permalink
support somacore>=1.0.24 / tiledbsoma>=1.15.0rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Dec 2, 2024
1 parent 2e9e5b1 commit 7ac69ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/python-tilledbsoma-ml-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- "tiledbsoma~=1.12.0"
- "tiledbsoma~=1.13.0"
- "tiledbsoma~=1.14.0"
- "tiledbsoma~=1.15.0rc4"

runs-on: ${{ matrix.os }}

Expand Down
8 changes: 7 additions & 1 deletion src/tiledbsoma_ml/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
import tiledbsoma as soma
import torch
import torchdata
from somacore.query._eager_iter import EagerIterator as _EagerIterator

try:
# somacore<1.0.24 / tiledbsoma<1.15
from somacore.query._eager_iter import EagerIterator as _EagerIterator
except ImportError:
# somacore>=1.0.24 / tiledbsoma>=1.15
from tiledbsoma._eager_iter import EagerIterator as _EagerIterator
from typing_extensions import Self

logger = logging.getLogger("tiledbsoma_ml.pytorch")
Expand Down
1 change: 1 addition & 0 deletions tests/test_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def add_dataframe(coll: CollectionBase, key: str, value_range: range) -> None:
]
),
index_column_names=["soma_joinid"],
domain=((value_range.start, value_range.stop),),
)
df.write(
pa.Table.from_pydict(
Expand Down

0 comments on commit 7ac69ad

Please sign in to comment.