Skip to content

Commit

Permalink
update modularl version
Browse files Browse the repository at this point in the history
  • Loading branch information
zakaria-narjis committed Aug 6, 2024
1 parent ffc2b23 commit 3aa5b9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modularl/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def act_train(self, batch_obs: torch.Tensor) -> torch.Tensor:
""" # noqa: E501

@abc.abstractmethod
def act_eval(self, obs: torch.Tensor) -> torch.Tensor:
def act_eval(self, batch_obs: torch.Tensor) -> torch.Tensor:
"""
Select an action for evaluation.
:param obs: (torch.Tensor) Tensor containing the observation.
:param batch_obs: (torch.Tensor) Tensor containing the observation.
:return: (torch.Tensor) Selected action for evaluation.
""" # noqa: E501

Expand Down
4 changes: 0 additions & 4 deletions modularl/agents/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ def observe(
def act_train(self, batch_obs: torch.Tensor) -> torch.Tensor:
"""
Generate actions for training based on the current policy.
This method handles the exploration-exploitation trade-off during training.
It uses a burning action function for initial exploration if specified,
then switches to the learned policy.
Expand All @@ -174,8 +172,6 @@ def act_train(self, batch_obs: torch.Tensor) -> torch.Tensor:
- If the global step is less than `learning_starts` and a burning action
function is provided, it uses that function for exploration.
- Otherwise, it uses the current policy (actor) to generate actions.
- The actions are detached from the computation graph to prevent
gradients from flowing back through the actor during certain updates.
""" # noqa: E501
if (
self.global_step < self.learning_starts
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="modularl",
version="0.1.1",
version="0.1.2",
author="Zakaria Narjis",
author_email="zakaria.narjis.97@gmail.com",
description="A modular reinforcement learning library",
Expand Down

0 comments on commit 3aa5b9a

Please sign in to comment.