ray.rllib.utils.framework.try_import_tfp#

ray.rllib.utils.framework.try_import_tfp(error: bool = False)[source]#

Tries importing tfp and returns the module (or None).

Parameters:

error – Whether to raise an error if tfp cannot be imported.

Returns:

The tfp module.

Raises:

ImportError – If error=True and tfp is not installed.