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

Bump torch to 2.4.1 #174

Merged
merged 3 commits into from
Sep 28, 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = { file = "LICENSE" }
authors = [{ name = "CZ Biohub SF", email = "[email protected]" }]
dependencies = [
"iohub==0.1.0",
"torch>=2.1.2",
"torch>=2.4.1",
"timm>=0.9.5",
"tensorboard>=2.13.0",
"lightning>=2.3.0",
Expand Down
16 changes: 3 additions & 13 deletions viscy/data/hcs_ram.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
import logging
import math
import os
import re
import tempfile
from pathlib import Path
from typing import Callable, Literal, Sequence

import numpy as np
import torch
import zarr
from imageio import imread
from iohub.ngff import ImageArray, Plate, Position, open_ome_zarr
from iohub.ngff import Position, open_ome_zarr
from lightning.pytorch import LightningDataModule
from monai.data import set_track_meta
from monai.data.utils import collate_meta_tensor
from monai.transforms import (
CenterSpatialCropd,
Compose,
MapTransform,
MultiSampleTrait,
RandAffined,
)
from torch import Tensor
from torch.utils.data import DataLoader, Dataset

from viscy.data.typing import ChannelMap, DictTransform, HCSStackIndex, NormMeta, Sample
from viscy.data.hcs import _read_norm_meta
from tqdm import tqdm
from viscy.data.typing import ChannelMap, DictTransform, Sample

_logger = logging.getLogger("lightning.pytorch")

Expand Down Expand Up @@ -224,7 +214,7 @@ def _fit_transform(self) -> tuple[Compose, Compose]:
)
val_transform = Compose(self.normalizations + final_crop)
return train_transform, val_transform

def _set_fit_global_state(self, num_positions: int) -> torch.Tensor:
# disable metadata tracking in MONAI for performance
set_track_meta(False)
Expand Down
Loading