Skip to content

Conversation

@mschwoer
Copy link
Contributor

@mschwoer mschwoer commented Jun 27, 2025

  • add the option to deactivate pjit (only functional change: 730572a)
  • refactor for readability

@mschwoer mschwoer requested review from GeorgWa, Copilot and swillems June 27, 2025 14:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the pjit functionality by adding an option to deactivate numba njit, refactoring for readability, and increasing the progress bar sleep time.

  • Added a conditional decorator to optionally apply numba.njit via a new parameter.
  • Refactored the pjit wrapper and progress callback mechanism.
  • Adjusted sleep timing in the progress callback to slow down updates.

return wrapper(_func)


def conditional_njit(use_numba: boolean=True, **kwargs) -> Callable:
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

The type hint 'boolean' is not standard in Python; please change it to 'bool' to maintain consistency and correctness.

Suggested change
def conditional_njit(use_numba: boolean=True, **kwargs) -> Callable:
def conditional_njit(use_numba: bool=True, **kwargs) -> Callable:

Copilot uses AI. Check for mistakes.
subsequently passed to the original function.
"""

# TODO this method never resets threads
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

Consider addressing the thread reset behavior in the wrapper function to avoid potential issues with stale thread states when reusing the function.

Copilot uses AI. Check for mistakes.
@mschwoer mschwoer requested a review from jalew188 June 27, 2025 14:09
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