You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -308,6 +308,13 @@ can get direct access to the underlying SummaryWriter in a callback:
308
308
.. warning::
309
309
This is method is not recommended and should only be used by advanced users.
310
310
311
+
.. note::
312
+
313
+
If you want a concrete example, you can watch `how to log lap time with donkeycar env <https://www.youtube.com/watch?v=v8j2bpcE4Rg&t=4619s>`_,
314
+
or read the code in the `RL Zoo <https://github.com/DLR-RM/rl-baselines3-zoo/blob/feat/gym-donkeycar/rl_zoo3/callbacks.py#L251-L270>`_.
315
+
You might also want to take a look at `issue #1160 <https://github.com/DLR-RM/stable-baselines3/issues/1160>`_ and `issue #1219 <https://github.com/DLR-RM/stable-baselines3/issues/1219>`_.
316
+
317
+
311
318
.. code-block:: python
312
319
313
320
from stable_baselines3 importSAC
@@ -331,6 +338,11 @@ can get direct access to the underlying SummaryWriter in a callback:
331
338
332
339
def_on_step(self) -> bool:
333
340
ifself.n_calls %self._log_freq ==0:
341
+
# You can have access to info from the env using self.locals.
342
+
# for instance, when using one env (index 0 of locals["infos"]):
0 commit comments