Skip to content

Commit eca5183

Browse files
committed
Fix codespell issue
1 parent 1a8fb1d commit eca5183

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

alf/algorithms/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def preprocess_experience(self, root_inputs, rollout_info, batch_info):
506506

507507
def summarize_rollout(self, experience):
508508
"""First call ``RLAlgorithm.summarize_rollout()`` to summarize basic
509-
rollout statisics. If the rl algorithm has overridden this function,
509+
rollout statistics. If the rl algorithm has overridden this function,
510510
then also call its customized version.
511511
"""
512512
super(Agent, self).summarize_rollout(experience)

alf/algorithms/mcts_algorithm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def _add_node(name: str, properties: dict):
227227

228228
@alf.configurable
229229
class MCTSAlgorithm(OffPolicyAlgorithm):
230+
# codespell:ignore-begin
230231
r"""Monte-Carlo Tree Search algorithm.
231232
232233
The code largely follows the pseudocode of
@@ -300,6 +301,8 @@ class MCTSAlgorithm(OffPolicyAlgorithm):
300301
extend these k' paths are most promising according to the UCB scores.
301302
"""
302303

304+
# codespell:ignore-end
305+
303306
def __init__(
304307
self,
305308
observation_spec,

alf/algorithms/muzero_representation_learner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
@alf.configurable
6262
class MuzeroRepresentationImpl(OffPolicyAlgorithm):
63+
# codespell:ignore-begin
6364
"""MuZero-style Representation Learner.
6465
6566
MuZero is described in the paper:
@@ -85,6 +86,8 @@ class MuzeroRepresentationImpl(OffPolicyAlgorithm):
8586
8687
"""
8788

89+
# codespell:ignore-end
90+
8891
def __init__(
8992
self,
9093
observation_spec,

alf/algorithms/taac_algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class TaacAlgorithmBase(OffPolicyAlgorithm):
230230
In a nutsell, for inference TAAC adds a second stage that chooses between a
231231
candidate trajectory :math:`\hat{\tau}` output by an SAC actor and the previous
232232
trajectory :math:`\tau^-`. For policy evaluation, TAAC uses a compare-through Q
233-
operator for TD backup by re-using state-action sequences that have shared
233+
operator for TD backup by reusing state-action sequences that have shared
234234
actions between rollout and training. For policy improvement, the
235235
new actor gradient is approximated by multiplying a scaling factor to the
236236
:math:`\frac{\partial Q}{\partial a}` term in the original SAC’s actor

alf/summary/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def is_rendering_enabled():
266266
def _rendering_wrapper(rendering_func):
267267
"""A wrapper function to gate the rendering function based on if rendering
268268
is enabled, and if yes generate a scoped rendering identifier before
269-
calling the rendering function. It re-uses the scope stack in ``alf.summary.summary_ops.py``.
269+
calling the rendering function. It reuses the scope stack in ``alf.summary.summary_ops.py``.
270270
"""
271271

272272
@functools.wraps(rendering_func)

alf/utils/losses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def iqn_huber_loss(value: torch.Tensor,
129129
is between this and the target.
130130
target: the time-major tensor for return, this is used as the target
131131
for computing the loss.
132-
next_delta_tau: the sampled increments of the probability for the input
132+
next_delta_tau: the sampled increments of the probability for the input
133133
of the quantile function of the target critics.
134134
fixed_tau: the fixed increments of probability, for non iqn style
135135
quantile regression.
@@ -166,7 +166,7 @@ def iqn_huber_loss(value: torch.Tensor,
166166
error = loss_fn(diff)
167167
if iqn_tau:
168168
if diff.ndim - tau_hat.ndim > 1:
169-
# For multidimentional reward:
169+
# For multidimensional reward:
170170
# diff is of shape [T or T-1, B, reward_dim, n_quantiles, n_quantiles]
171171
# while tau_hat and next_delta_tau have shape [T or T-1, B, n_quantiles]
172172
tau_hat = tau_hat.unsqueeze(-2)

0 commit comments

Comments
 (0)