ImportError: cannot import name 'ActionMaskingTorchRLModule' from 'ray.rllib.examples.rl_modules.classes.action_masking_rlm

How severe does this issue affect your experience of using Ray?

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

I want to learn how to make action masking using rllib, and when I run this example, it gives me the following error :

ImportError: cannot import name ‘ActionMaskingTorchRLModule’ from 'ray.rllib.examples.rl_modules.classes.action_masking_rlm

Indeed, when I look into this file, there is no such class. However, there is TorchActionMaskRLM. Is it a error, or do I just miss something ?

I use ray 2.30, python 3.11.7, windows 11

Try with a version later than 2.30, or the nightly built, and see if that is fixed. As this kind of example has been put also to regular CI test, I think this issue was detected fast.