You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently RLlib disables V2 behavior entirely. We should allow eager execution (at least for a subset of algorithms). This will be easier once #4788 is done.
It seems that with ModelV2 we can allow most policy methods, including the model, action distribution, and loss, to be executed eagerly. Currently trying to prototype this in the ModelV2 PR.
The long-term solution here is probably to have a separate EagerTFPolicy implementation of TFPolicy that implements the eager strategy. Policies can switch between that and the current TFPolicy. With the new build_tf_policy API, policy definitions should be compatible with either eager or graph execution.
I tried some variations of tf.py_function to allow eager within the existing TFPolicy, but there are some serious limitations there. In particular, variables referenced within tf.py_function aren't picked up when computing gradients.
Describe the problem
Currently RLlib disables V2 behavior entirely. We should allow eager execution (at least for a subset of algorithms). This will be easier once #4788 is done.
One possibility is to still use graph mode, but allow eager in the loss function and model with:
https://www.tensorflow.org/api_docs/python/tf/py_function
The text was updated successfully, but these errors were encountered: