ray.rllib.env.utils.try_import_open_spiel#

ray.rllib.env.utils.try_import_open_spiel(error: bool = False)[source]#

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

Parameters:

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

Returns:

The open_spiel module.

Raises:

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