Skip to content

Commit

Permalink
log reward clipping is now -100 (much smaller)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdviviano committed Oct 20, 2023
1 parent 4b8cf79 commit a357475
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/gfn/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
sf: Optional[TT["state_shape", torch.float]] = None,
device_str: Optional[str] = None,
preprocessor: Optional[Preprocessor] = None,
log_reward_clip: Optional[float] = -20.0,
log_reward_clip: Optional[float] = -100.,
):
"""Initializes an environment.
Expand Down Expand Up @@ -221,7 +221,7 @@ def __init__(
sf: Optional[TT["state_shape", torch.float]] = None,
device_str: Optional[str] = None,
preprocessor: Optional[Preprocessor] = None,
log_reward_clip: Optional[float] = -20.0,
log_reward_clip: Optional[float] = -100.0,
):
"""Initializes a discrete environment.
Expand Down
2 changes: 1 addition & 1 deletion src/gfn/gym/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
R2: float = 2.0,
epsilon: float = 1e-4,
device_str: Literal["cpu", "cuda"] = "cpu",
log_reward_clip: float = -20.,
log_reward_clip: float = -100.,
):
assert 0 < delta <= 1, "delta must be in (0, 1]"
self.delta = delta
Expand Down
2 changes: 1 addition & 1 deletion src/gfn/gym/discrete_ebm.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
alpha: float = 1.0,
device_str: Literal["cpu", "cuda"] = "cpu",
preprocessor_name: Literal["Identity", "Enum"] = "Identity",
log_reward_clip: float = -20.,
log_reward_clip: float = -100.,
):
"""Discrete EBM environment.
Expand Down
2 changes: 1 addition & 1 deletion src/gfn/gym/hypergrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
reward_cos: bool = False,
device_str: Literal["cpu", "cuda"] = "cpu",
preprocessor_name: Literal["KHot", "OneHot", "Identity", "Enum"] = "KHot",
log_reward_clip: float = -20.,
log_reward_clip: float = -100.,
):
"""HyperGrid environment from the GFlowNets paper.
The states are represented as 1-d tensors of length `ndim` with values in
Expand Down

0 comments on commit a357475

Please sign in to comment.