Skip to content

fix: create vizdoom cache dir before training starts #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions runner/frameworks/rl/sf_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import warnings
from argparse import Namespace
from pathlib import Path
from typing import Any, Dict, Optional

# from retinal_rl.rl.sample_factory.observer import RetinalAlgoObserver
Expand Down Expand Up @@ -68,6 +69,13 @@ def train(
)
# Run simulation
if not (self.sf_cfg.dry_run):
# HACK: Create the directory for the vizdoom logs, before vizdoom tries to do it:
# Else envs will interfere in the creation process and crash, causing RolloutWorkers
# to stop and thus the whole training to abort.
(Path(self.cfg.path.run_dir) / "_vizdoom").mkdir(
parents=True, exist_ok=True
)

cfg, runner = make_runner(self.sf_cfg)
# if cfg.online_analysis:
# runner.register_observer(RetinalAlgoObserver(self.sf_cfg))
Expand Down
Loading