lsnu commited on
Commit
bd2d170
·
verified ·
1 Parent(s): 4a1e8a6

Normalize non-finite metric export to null

Browse files
code/scripts/launch_oven_fuller_logging_batch.py CHANGED
@@ -41,7 +41,7 @@ def _configure_coppeliasim_env() -> None:
41
  _configure_thread_env()
42
  _configure_coppeliasim_env()
43
 
44
- from rr_label_study.oven_study import _aggregate_summary, _episode_dirs
45
 
46
 
47
  def _select_episode_indices(
@@ -99,7 +99,7 @@ def _load_metrics(result_dir: Path, episode_names: Sequence[str]) -> List[Dict[s
99
  def _write_json(path: Path, payload: Dict[str, object]) -> None:
100
  path.parent.mkdir(parents=True, exist_ok=True)
101
  with path.open("w", encoding="utf-8") as handle:
102
- json.dump(payload, handle, indent=2)
103
 
104
 
105
  def _run_episode(
 
41
  _configure_thread_env()
42
  _configure_coppeliasim_env()
43
 
44
+ from rr_label_study.oven_study import _aggregate_summary, _episode_dirs, _json_safe
45
 
46
 
47
  def _select_episode_indices(
 
99
  def _write_json(path: Path, payload: Dict[str, object]) -> None:
100
  path.parent.mkdir(parents=True, exist_ok=True)
101
  with path.open("w", encoding="utf-8") as handle:
102
+ json.dump(_json_safe(payload), handle, indent=2, allow_nan=False)
103
 
104
 
105
  def _run_episode(