Skip to content

Comments

Refactor: LensDataset and WrapperDataset for Cleaner Data Handling#151

Open
Apprentice2907 wants to merge 6 commits intoML4SCI:mainfrom
Apprentice2907:Refactor-LensDataset-and-WrapperDataset
Open

Refactor: LensDataset and WrapperDataset for Cleaner Data Handling#151
Apprentice2907 wants to merge 6 commits intoML4SCI:mainfrom
Apprentice2907:Refactor-LensDataset-and-WrapperDataset

Conversation

@Apprentice2907
Copy link

Closes #123

What was changed

  • Removed duplicate imports in dataset.py
  • Extracted repeated download/check logic into _resolve_dataset_dir() helper
  • Replaced hardcoded if label == 0: image = image[0] with configurable npy_index_map
  • Added WrapperDataset for dynamic transform injection at runtime
  • Unified DeepLenseDatasetSSL under LensDatasetSSL extending LensDataset
  • Added DefaultDatasetSetup (non-SSL) class
  • Added full type hints throughout
  • Renamed utils/random.py → utils/lens_random.py to fix Windows circular import bug
  • Updated all imports across main.py, main_ray.py, finetune_byol.py,
    simsiam.py, utils/inference.py, self_supervised/examples/byol/load_pretrained_byol.py

Testing

  • Verified imports resolve correctly
  • Tested with .npy simulation data, 224x224 tensor outputs confirmed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor LensDataset and WrapperDataset for Cleaner Data Handling

1 participant