Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ pip install -e .[dev]
# pip install -e .\[dev\]

# Run code style checks
pre-commit --all-files
pre-commit run --all-files

# Commit the code after all checks pass
git commit -am "create example workflow"
Expand Down
10 changes: 1 addition & 9 deletions trinity/algorithm/entropy_loss_fn/entropy_loss_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def __call__(
"""

@classmethod
@abstractmethod
def default_args(cls) -> Dict:
"""
Returns:
`Dict`: The default arguments for the entropy loss function.
"""
return {"entropy_coef": 0.0}


@ENTROPY_LOSS_FN.register_module("basic")
Expand All @@ -58,10 +58,6 @@ def __call__(
entropy_loss = masked_mean(entropy, action_mask)
return entropy_loss * self.entropy_coef, {"entropy_loss": entropy_loss.detach().item()}

@classmethod
def default_args(cls) -> Dict:
return {"entropy_coef": 0.0}


@ENTROPY_LOSS_FN.register_module("none")
class DummyEntropyLossFn(EntropyLossFn):
Expand All @@ -79,7 +75,3 @@ def __call__(
**kwargs,
) -> Tuple[torch.Tensor, Dict]:
return torch.tensor(0.0), {}

@classmethod
def default_args(cls) -> Dict:
return {}