We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af93e26 commit b56749dCopy full SHA for b56749d
src/tiledbsoma_ml/scvi.py
@@ -1,10 +1,10 @@
1
from __future__ import annotations
2
3
+import os
4
from typing import Any, Sequence
5
6
import pandas as pd
7
import torch
-import os
8
from lightning import LightningDataModule
9
from sklearn.preprocessing import LabelEncoder
10
from tiledbsoma import ExperimentAxisQuery
@@ -16,9 +16,10 @@
16
DEFAULT_DATALOADER_KWARGS: dict[str, Any] = {
17
"pin_memory": torch.cuda.is_available(),
18
"persistent_workers": True,
19
- "num_workers": max(((os.cpu_count() or 1) // 2), 1)
+ "num_workers": max(((os.cpu_count() or 1) // 2), 1),
20
}
21
22
+
23
class SCVIDataModule(LightningDataModule): # type: ignore[misc]
24
"""PyTorch Lightning DataModule for training scVI models from SOMA data.
25
0 commit comments