Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLlib] Disable callbacks callable check for new api stack #50157

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rllib/algorithms/algorithm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2515,7 +2515,7 @@ def callbacks(
# Check, whether given `callbacks` is a callable.
# TODO (sven): Once the old API stack is deprecated, this can also be None
# (which should then become the default value for this attribute).
if not callable(callbacks_class):
if not callable(callbacks_class) and not self.enable_rl_module_and_learner:
raise ValueError(
"`config.callbacks_class` must be a callable method that "
"returns a subclass of DefaultCallbacks, got "
Expand Down Expand Up @@ -4273,7 +4273,6 @@ def get_multi_rl_module_spec(
# Fill in the missing values from the specs that we already have. By combining
# PolicySpecs and the default RLModuleSpec.
for module_id in policy_dict | multi_rl_module_spec.rl_module_specs:

# Remove/skip `learner_only=True` RLModules if `inference_only` is True.
module_spec = multi_rl_module_spec.rl_module_specs[module_id]
if inference_only and module_spec.learner_only:
Expand Down