Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson committed Nov 16, 2024
1 parent 8ee0905 commit d070cbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/scportrait/io/daskmmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,5 @@ def load_hdf5_chunk(file_path: str, container_name: str, slices: tuple[slice, ..
The sliced chunk from the HDF5 dataset
"""
with h5py.File(file_path, "r") as f:
f[container_name][slices]
data = f[container_name][slices]
return data
5 changes: 2 additions & 3 deletions src/scportrait/pipeline/_utils/spatialdata_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def _(self, data: DataTree, classes: set[int] | None = None) -> DataTree:
if classes is not None:
for d in data:
data[d].attrs["cell_ids"] = classes
else:
for d in data:
data[d] = self._get_cell_ids(data[d])
for d in data:
data[d] = self._get_cell_ids(data[d])
return data
2 changes: 1 addition & 1 deletion src/scportrait/tools/ml/pretrained_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def load_multilabelSupervised(
hparam_path: str | Path,
model_type: str,
eval: bool = True,
device: Literal["cuda", "cpu"] = "cuda",
device: Literal["cpu", "cuda", "mps"] = "cuda",
) -> MultilabelSupervisedModel:
"""Load a pretrained model uploaded to the github repository.
Expand Down

0 comments on commit d070cbf

Please sign in to comment.