Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support somacore>=1.0.24 / tiledbsoma>=1.15 #19

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions tests/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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
Loading