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 19, 2024
1 parent 68a8fa2 commit eb880b4
Show file tree
Hide file tree
Showing 2 changed files with 8 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 @@ -27,7 +27,6 @@
import scipy.sparse as sparse
import tiledbsoma as soma
import torch
from somacore.query._eager_iter import EagerIterator as _EagerIterator

from tiledbsoma_ml._csr import CSR_IO_Buffer
from tiledbsoma_ml._distributed import (
Expand All @@ -37,6 +36,13 @@
from tiledbsoma_ml._experiment_locator import ExperimentLocator
from tiledbsoma_ml._utils import NDArrayNumber, batched, splits

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

logger = logging.getLogger("tiledbsoma_ml.pytorch")

NDArrayJoinId = npt.NDArray[np.int64]
Expand Down

0 comments on commit eb880b4

Please sign in to comment.