Skip to content

Commit

Permalink
Merge branch 'main' into fco/update_zsc_task
Browse files Browse the repository at this point in the history
  • Loading branch information
fcogidi authored Oct 28, 2024
2 parents 1f755bb + a247b4e commit 5eb8dc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion mmlearn/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class MMLearnConf:
job=JobConf(
name=II("experiment_name"),
env_set={
"NCCL_IB_DISABLE": "1",
"TORCH_NCCL_ASYNC_ERROR_HANDLING": "3",
"HYDRA_FULL_ERROR": "1",
},
Expand Down
13 changes: 7 additions & 6 deletions projects/med_benchmarking/datasets/pad_ufes_20.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

import pandas as pd
import torch
from omegaconf import MISSING
from PIL import Image
from torch.utils.data import Dataset
from torchvision.transforms import CenterCrop, Compose, Resize, ToTensor

from mmlearn.conf import external_store
from mmlearn.constants import EXAMPLE_INDEX_KEY
from mmlearn.datasets.core import Modalities
from mmlearn.datasets.core.example import Example
from omegaconf import MISSING
from PIL import Image
from torch.utils.data import Dataset
from torchvision.transforms import CenterCrop, Compose, Resize, ToTensor


@external_store(group="datasets", root_dir=os.getenv("PADUFES_ROOT_DIR", MISSING))
Expand Down Expand Up @@ -69,7 +68,9 @@ def _load_and_process_metadata(self) -> pd.DataFrame:
df["path"] = df["img_id"].apply(
lambda imgid: os.path.join(self.root_dir, "Dataset", imgid)
)
df.drop(columns=["img_id", "diagnostic"], inplace=True)
df.drop(columns=["img_id", "diagnostic"], inplace=True).reset_index(
drop=True, inplace=True
)

# Split into train and test
dataset = {}
Expand Down

0 comments on commit 5eb8dc2

Please sign in to comment.