Skip to content

[ENH] Refactor progress bar backend to allow user choice#638

Open
arnavk23 wants to merge 5 commits intopytorch-tabular:mainfrom
arnavk23:refactor-progress-bar-backend
Open

[ENH] Refactor progress bar backend to allow user choice#638
arnavk23 wants to merge 5 commits intopytorch-tabular:mainfrom
arnavk23:refactor-progress-bar-backend

Conversation

@arnavk23
Copy link

@arnavk23 arnavk23 commented Feb 2, 2026

…rich

- Create progress utility module with configurable backends (rich, tqdm, none)
- Update config default to 'simple' and fix metadata
- Make rich an optional dependency
- Update all hard-coded rich imports to use the utility
- Handle progress bar selection in tabular_model callbacks
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Thanks! Though, are you sure this makes rich optional? It is still being used as hard-coded option without an alternative in some places (see above)

- Change internal utilities to use 'none' backend to avoid rich dependency
- Update sweep and tuner to use 'simple' instead of 'rich' when progress enabled
- Refactor predict method to use progress utility instead of manual backend checks
- Ensure all progress usage is configurable and doesn't force rich dependency
- Update get_progress_tracker and get_progress_context defaults from 'rich' to 'none'
- Ensures no hard-coded rich usage in utility functions
- Rich is now truly optional with graceful fallback
- Update fallback lambda functions to accept **kwargs to handle description and other parameters
- Prevents TypeError when progress tracker is called with keyword arguments
@arnavk23 arnavk23 requested a review from fkiraly February 3, 2026 19:50
…allback selection

- Create get_progress_bar_callback() function for choosing progress bar callbacks
- Refactor _prepare_callbacks to use the utility instead of manual if/elif logic
- Further decouples progress bar handling from direct Lightning imports
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