Skip to content

Commit cfcb757

Browse files
committed
Use name in logging
1 parent c8f1e10 commit cfcb757

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/ppo.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from datetime import datetime
2+
13
import equinox as eqx
24
from jax import numpy as jnp
35
from jax import random as jr
@@ -37,7 +39,6 @@ def build_policy(env: AbstractEnvLike, *, key: Key) -> CustomActorCriticPolicy:
3739
def main():
3840
seed = 0
3941
total_timesteps = 2**20
40-
logdir = "logs/CartPole_PPO"
4142

4243
policy_key, learn_key = jr.split(jr.key(seed), 2)
4344

@@ -54,7 +55,7 @@ def main():
5455
total_timesteps=total_timesteps,
5556
key=learn_key,
5657
show_progress_bar=True,
57-
tb_log_name=logdir,
58+
tb_log_name=f"logs/{env.name}_{datetime.now().strftime("%H%M%S")}",
5859
)
5960

6061

0 commit comments

Comments
 (0)