TL;DR you can savely ignore this warning. See also here: ValueError: `RLModule(config=[RLModuleConfig])` has been deprecated- New API Stack - #17 by Daraan
You already found the correct line that creates the actually deprecated module.config
attribute, as this is hard-coded you can do nothing to avoid this line from being executed.
As it is only logged once I execute this before my code
# suppress a deprecation warning from ray, by creating a RLModuleConfig once
try:
from ray.rllib.core.rl_module.rl_module import RLModuleConfig
except ImportError: # might not exist anymore in the future
pass
else:
from ray.rllib.utils.deprecation import logger as __deprecation_logger
import logging
# This suppresses a deprecation warning from RLModuleConfig
__old_level = __deprecation_logger.getEffectiveLevel()
__deprecation_logger.setLevel(logging.ERROR)
RLModuleConfig()
__deprecation_logger.setLevel(__old_level)
del __deprecation_logger
del logging
del RLModuleConfig