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

refactor(lazy import): centralize, optimize, CPU fallback when broken… #577

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

lmeyerov
Copy link
Contributor

@lmeyerov lmeyerov commented Jul 19, 2024

Fixes colab until #517 gets figured out


Fixed

  • Graceful CPU fallbacks: When lazy GPU dependency imports throw ImportError, now warns and falls back, instead of crashing. Commonly seen due to:

    • GPU libs installed but broken CUDA environments
    • GPU libs installed but no GPU
  • Ring layouts handle filtered DF inputs, no longer giving unexpected positions

  • g.encode_axis(...) updates now functional; were erroneously doing global inplace updates

Changed

  • Centralize lazy imports into graphistry.utils.lazy_import
  • Lazy imports distinguish ModuleNotFound (=> False) from ImportError (warn + False)

Optimized

More cudf sniffing without an import

@lmeyerov lmeyerov merged commit c8eb9c2 into master Jul 22, 2024
34 checks passed
@lmeyerov lmeyerov deleted the dev/tolerate-cudf-fail branch July 22, 2024 11:58
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