Skip to content

Commit 8dbfa7d

Browse files
committed
Check for hook function.
1 parent 4fa5bc7 commit 8dbfa7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/rlai/policy_gradient/policies/continuous_action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def __getitem__(
924924
]))
925925

926926
# send the results to the hook if we have one
927-
if self.get_item_hook is not None:
927+
if hasattr(self, 'get_item_hook') and self.get_item_hook is not None:
928928
self.get_item_hook(
929929
state_feature_vector,
930930
action_a,

0 commit comments

Comments
 (0)