NVIDIA-Merlin / core

Core Utilities for NVIDIA Merlin
Apache License 2.0
19 stars 14 forks source link

add check for respective packages in dataformat #354

Closed jperez999 closed 1 year ago

jperez999 commented 1 year ago

This PR addresses an issue that crops up when you try to run merlin in an environment where cupy/cudf have been installed but are not available. target_format resolves to DataFrame type but it can be either cudf or pandas and we check for cudf first. In this case we run into errors making the conversion because cudf does not import successfully in these cases. By added these check to the conditional for each conversion we add safeguards that ensure we do not try to convert to a type that does not exist.

github-actions[bot] commented 1 year ago

Documentation preview

https://nvidia-merlin.github.io/core/review/pr-354