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
2 changes: 1 addition & 1 deletion scripts/tracking/rl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main(
log_dir = log_root_path / log_dir

# Create env.
env = gym.make(task, cfg=env_cfg)
env = gym.make(task, cfg=env_cfg, render_mode="rgb_array" if video else None)

# Save resume path before creating a new log_dir.
resume_path = None
Expand Down
4 changes: 1 addition & 3 deletions scripts/velocity/rl/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
KEY_BACKSPACE = 259
KEY_ENTER = 257

_HERE = Path(__file__).parent


def main(
task: str,
Expand All @@ -52,7 +50,7 @@ def main(
env_cfg.sim.render.height = video_height or env_cfg.sim.render.height
env_cfg.sim.render.width = video_width or env_cfg.sim.render.width

log_root_path = _HERE / "logs" / "rsl_rl" / agent_cfg.experiment_name
log_root_path = Path("logs") / "rsl_rl" / agent_cfg.experiment_name
log_root_path = log_root_path.resolve()
print(f"[INFO]: Loading experiment from: {log_root_path}")

Expand Down
6 changes: 2 additions & 4 deletions scripts/velocity/rl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
torch.backends.cudnn.deterministic = False
torch.backends.cudnn.benchmark = False

_HERE = Path(__file__).parent


def main(
task: str,
Expand All @@ -51,7 +49,7 @@ def main(
env_cfg.sim.device = device or env_cfg.sim.device

# Specify directory for logging experiments.
log_root_path = _HERE / "logs" / "rsl_rl" / agent_cfg.experiment_name
log_root_path = Path("logs") / "rsl_rl" / agent_cfg.experiment_name
log_root_path.resolve()
print(f"[INFO] Logging experiment in directory: {log_root_path}")
log_dir = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
Expand All @@ -60,7 +58,7 @@ def main(
log_dir = log_root_path / log_dir

# Create env.
env = gym.make(task, cfg=env_cfg)
env = gym.make(task, cfg=env_cfg, render_mode="rgb_array" if video else None)

# Save resume path before creating a new log_dir.
resume_path = (
Expand Down