Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR adds a new dataset download script for CLIP Vision benchmarking and refactors the rich_utils module. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds a utility script to download all 20 datasets in the TALL-20 benchmark and improves the print_config_tree function in the rich_utils module. The changes include transitioning from "paths" to "path" config naming and enhancing the config tree display with better organization of unlisted fields.
Key Changes
- New script for batch downloading TALL-20 benchmark datasets using Hydra configuration
- Updated
print_config_treeto display unlisted config fields in an "[others]" section - Transition from "paths" to "path" in config naming convention
- Improved docstring formatting from reStructuredText to Google style
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| examples/clip_finetune/download_20_datasets.py | New utility script that iterates through TALL-20 train datasets and downloads them using the CLIPVisionModelPool |
| fusion_bench/utils/rich_utils.py | Updates print_config_tree function to use "path" instead of "paths", improves documentation, reorganizes logic to group unlisted config fields, and adds error handling for missing output_dir |
| Args: | ||
| cfg (DictConfig): A DictConfig composed by Hydra. | ||
| print_order (Sequence[str], optional): Determines in what order config components are printed. | ||
| Defaults to ``("data", "model", "callbacks", "logger", "trainer", "paths", "extras")``. |
There was a problem hiding this comment.
Inconsistency in documentation: The docstring at line 185 still mentions "paths" in the default print_order, but the actual parameter at line 171 has been changed to "path". The documentation should be updated to reflect the actual parameter value.
| Defaults to ``("data", "model", "callbacks", "logger", "trainer", "paths", "extras")``. | |
| Defaults to ``("data", "model", "callbacks", "logger", "trainer", "path", "extras")``. |
| "Cannot save config tree to file. 'paths.output_dir' is not specified in the config." | ||
| ) | ||
| else: | ||
| with open(Path(cfg.path.output_dir, "config_tree.log"), "w") as file: |
There was a problem hiding this comment.
Inconsistency between validation and usage: Line 250 checks for "paths" (cfg.get("paths") or not cfg.paths.get("output_dir")) and line 252 references "paths.output_dir" in the error message, but line 255 uses "path.output_dir" (cfg.path.output_dir). This will cause an AttributeError when trying to save the file since the validation checks for "paths" but then tries to access "path". Either both should use "paths" or both should use "path" consistently.
| with open(Path(cfg.path.output_dir, "config_tree.log"), "w") as file: | |
| with open(Path(cfg.paths.output_dir, "config_tree.log"), "w") as file: |
| config_name="fabric_model_fusion", | ||
| overrides=[ | ||
| "method=dummy", | ||
| "modelpool=CLIPVisionModelPool/clip-vit-base-patch16_TALL20.yaml", |
There was a problem hiding this comment.
The modelpool configuration path includes ".yaml" extension in the override, but Hydra typically expects config names without the extension. This should be "modelpool=CLIPVisionModelPool/clip-vit-base-patch16_TALL20" instead of "modelpool=CLIPVisionModelPool/clip-vit-base-patch16_TALL20.yaml".
| "modelpool=CLIPVisionModelPool/clip-vit-base-patch16_TALL20.yaml", | |
| "modelpool=CLIPVisionModelPool/clip-vit-base-patch16_TALL20", |
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.