Skip to content

Commit c440fea

Browse files
support somacore>=1.0.24 / tiledbsoma>=1.15.0rc4 (#19)
1 parent 68a8fa2 commit c440fea

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/python-tilledbsoma-ml-compat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- "tiledbsoma~=1.12.0"
3232
- "tiledbsoma~=1.13.0"
3333
- "tiledbsoma~=1.14.0"
34+
- "tiledbsoma~=1.15.0rc4"
3435

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

src/tiledbsoma_ml/pytorch.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import scipy.sparse as sparse
2828
import tiledbsoma as soma
2929
import torch
30-
from somacore.query._eager_iter import EagerIterator as _EagerIterator
3130

3231
from tiledbsoma_ml._csr import CSR_IO_Buffer
3332
from tiledbsoma_ml._distributed import (
@@ -37,6 +36,13 @@
3736
from tiledbsoma_ml._experiment_locator import ExperimentLocator
3837
from tiledbsoma_ml._utils import NDArrayNumber, batched, splits
3938

39+
try:
40+
# somacore<1.0.24 / tiledbsoma<1.15
41+
from somacore.query._eager_iter import EagerIterator as _EagerIterator
42+
except ImportError:
43+
# somacore>=1.0.24 / tiledbsoma>=1.15
44+
from tiledbsoma._eager_iter import EagerIterator as _EagerIterator
45+
4046
logger = logging.getLogger("tiledbsoma_ml.pytorch")
4147

4248
NDArrayJoinId = npt.NDArray[np.int64]

tests/_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def add_dataframe(coll: CollectionBase, key: str, value_range: range) -> None:
7171
]
7272
),
7373
index_column_names=["soma_joinid"],
74+
domain=((value_range.start, value_range.stop),),
7475
)
7576
df.write(
7677
pa.Table.from_pydict(

0 commit comments

Comments
 (0)