Skip to content

Commit

Permalink
multi thread debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Jun 10, 2024
1 parent 5219e03 commit f4e54a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scdataloader/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
SubsetRandomSampler,
SequentialSampler,
RandomSampler,
)
)
import torch
from torch.utils.data import DataLoader, Sampler
import lightning as L
Expand All @@ -29,7 +29,7 @@ def __init__(
train_oversampling_per_epoch: float = 0.1,
validation_split: float = 0.2,
test_split: float = 0,
gene_embeddings: str = "",
gene_embeddings: str = "",
use_default_col: bool = True,
gene_position_tolerance: int = 10_000,
# this is for the mappedCollection
Expand Down
2 changes: 2 additions & 0 deletions scdataloader/mapped.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ def _make_encoders(self, encode_labels: list):
if unknown_label is not None and unknown_label in cats:
cats.remove(unknown_label)
encoder[unknown_label] = -1
cats = list(cats)
cats.sort()
encoder.update({cat: i for i, cat in enumerate(cats)})
self.encoders[label] = encoder

Expand Down

0 comments on commit f4e54a9

Please sign in to comment.