Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
BY571 committed Nov 3, 2023
1 parent 0800132 commit a0f7189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchrl/modules/tensordict_module/exploration.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def __init__(
action_mask_key: Optional[NestedKey] = None,
):
if not isinstance(eps_init, float):
print("Warning: eps_init should be a float.")
warnings.warn("eps_init should be a float.")
if eps_end > eps_init:
print("Warning: eps should decrease over time or be constant.")
raise RuntimeError("eps should decrease over time or be constant")
self.action_key = action_key
self.action_mask_key = action_mask_key
in_keys = [self.action_key]
Expand Down

0 comments on commit a0f7189

Please sign in to comment.