Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to Null Checks and Device Assignment in LSI and ETM Models #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

XavierSpycy
Copy link

Description

This pull request addresses two main issues found in the models.LSI and models.ETM modules.

Changes Made

  1. Improved Null Checks in models.LSI:

    • Updated comparisons from == None to is None in two locations within the models.LSI module. This change ensures a more reliable and Pythonic way of handling null checks.
  2. Refined Device Assignment in models.ETM:

    • Addressed three specific device assignment issues:
      • CPU Use on CUDA-capable Devices: Even when the device parameter was explicitly set to 'cpu' on CUDA-capable devices, the model was still being assigned to a GPU. This has been corrected to respect the user's device preference.
      • GPU Selection on Multi-GPU Systems: Previously, specifying a particular GPU (e.g., 'cuda:1') on systems with multiple GPUs incorrectly defaulted to the first GPU due to automatic checks and assignments. This update ensures that the specified GPU is used as intended.
      • MPS Acceleration on Apple Devices: On Apple machines supporting 'mps', attempting to use MPS acceleration would default to 'cpu' when 'cuda' was unavailable. This behavior has been adjusted to properly recognize and utilize 'mps' if specified.

Rationale

These updates enhanced the usability and functionality of the affected models. By ensuring that null checks are more robust and device assignments adhere to user specifications, we can provide a more predictable and efficient user experience.

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.

1 participant