fix(exp23): invisible barriers + single-instance guard
- generated_road.unity + generated_track.unity: showBarrierMeshes 1→0. Visible barrier meshes would appear in the camera observation and let the policy learn from an artificial visual cue that won't exist at eval time. - exp23: add PID-file guard — aborts immediately if another instance is already running, preventing multiple cars from spawning in the sim. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
75f7857250
commit
c05e79d30c
|
|
@ -21,6 +21,19 @@ from datetime import datetime
|
|||
|
||||
sys.path.insert(0, '/home/paulh/projects/donkeycar-rl-autoresearch/agent')
|
||||
|
||||
# Abort if another instance of this experiment is already running.
|
||||
_PIDFILE = '/home/paulh/projects/donkeycar-rl-autoresearch/agent/models/exp23-generated-road-clean/current.pid'
|
||||
if os.path.exists(_PIDFILE):
|
||||
try:
|
||||
_old = int(open(_PIDFILE).read().strip())
|
||||
if _old != os.getpid():
|
||||
import signal
|
||||
os.kill(_old, 0) # raises OSError if process is gone
|
||||
print(f'[exp23] Another instance already running (PID {_old}). Exiting.', flush=True)
|
||||
sys.exit(1)
|
||||
except (OSError, ValueError):
|
||||
pass # stale pid file — safe to continue
|
||||
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
from stable_baselines3 import PPO
|
||||
|
|
|
|||
Loading…
Reference in New Issue