Skip to content

Code Cleanup#185

Merged
annawoodard merged 17 commits intomainfrom
code_cleanup
Apr 30, 2025
Merged

Code Cleanup#185
annawoodard merged 17 commits intomainfrom
code_cleanup

Conversation

@collin-k
Copy link
Copy Markdown
Contributor

@collin-k collin-k commented Apr 15, 2025

Description
This PR addresses code readability and maintainability.

Changes

  1. The config.REGULARIZATION_TYPE and config.REGULARIZATION_WEIGHT in the train_epoch function in train.py are now passed as flat parameters rather than as a tuple.
  2. Configuration variables for KaneCounty and RiverDatset classes were revised to be passed as individual parameters arguments rather than as a tuple. The code to instantiate KaneCounty and RiverDataset within train.py (in the initialize_dataset function) was changed accordingly. The docstrings within each class was revised accordingly.
  3. Variables within KaneCounty and RiverDataset were changed to instance variable using self. The docstrings within each class was revised accordingly.
  4. Configuration variables for BalancedRandomBatchGeoSampler and BalancedGridGeoSampler classes were revised to be passed as individual parameters arguments rather than as a dictionary. The code to instantiate BalancedRandomBatchGeoSampler and BalancedGridGeoSampler within train.py (in the build_dataloader function) was partially changed accordingly (only lines 224-233. The docstrings within each class was revised accordingly.

@collin-k collin-k changed the title [WIP] Code Cleanup Code Cleanup Apr 24, 2025
Copy link
Copy Markdown
Collaborator

@annawoodard annawoodard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonderful thank you @collin-k!!!!!

@annawoodard annawoodard merged commit d7bcf2c into main Apr 30, 2025
1 check passed
@annawoodard annawoodard deleted the code_cleanup branch April 30, 2025 21:22
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.

2 participants