MCPcopy Create free account
hub / github.com/BrainCoTech/RevoLab / _read_command_file

Function _read_command_file

scripts/rl_games/play.py:116–123  ·  view source on GitHub ↗
(path: Path | None, fallback: torch.Tensor, last_mtime: float | None)

Source from the content-addressed store, hash-verified

114
115
116def _read_command_file(path: Path | None, fallback: torch.Tensor, last_mtime: float | None) -> tuple[torch.Tensor, float | None]:
117 if path is None or not path.exists():
118 return fallback, last_mtime
119 stat = path.stat()
120 if last_mtime is not None and math.isclose(stat.st_mtime, last_mtime):
121 return fallback, last_mtime
122 command = _parse_handover_command(path.read_text(encoding="utf-8"))
123 return command, stat.st_mtime
124
125
126@hydra_task_config(args_cli.task, args_cli.agent)

Callers 1

mainFunction · 0.85

Calls 1

_parse_handover_commandFunction · 0.85

Tested by

no test coverage detected