Skip to content

fix: make Wildfire result paths cross-platform - #6

Open
carlosfab wants to merge 1 commit into
generalroboticslab:mainfrom
carlosfab:codex/fix-wildfire-result-paths
Open

fix: make Wildfire result paths cross-platform#6
carlosfab wants to merge 1 commit into
generalroboticslab:mainfrom
carlosfab:codex/fix-wildfire-result-paths

Conversation

@carlosfab

Copy link
Copy Markdown

Context

While reproducing the Wildfire MANUAL baseline on macOS from upstream commit
d648f128, I ran one step of Cut_Trees_Sparse_small with seed 483 and three
neutral (0) firefighter actions. The simulation itself reached
TEST COMPLETE, produced a score of 6, and made no API calls, but automatic
post-processing failed with FileNotFoundError.

The Python entrypoint had written data.csv below the literal path
results\logs\MANUAL, while Unity had written 504 frames below
results/logs/MANUAL. A backslash is a path separator on Windows but an ordinary
filename character on POSIX systems, so the CSV and frames ended up in different
directory trees. Rendering succeeded only after manually consolidating the
artifacts under the POSIX tree and invoking the existing renderer directly.

The same hardcoded separator pattern was present in all seven Wildfire
entrypoints and in six agent chat-log implementations.

Changes

  • centralize result and agent chat path construction with pathlib while
    preserving string paths at the call boundary;
  • use the shared helpers in CAMON, COELA, Embodied, HMAS_2, MANUAL, and both
    algorithm templates;
  • make the standalone renderer example platform-independent;
  • add regression coverage for POSIX paths, Windows paths, nested agent chat
    paths, and co-location of result and chat artifacts.

This does not change algorithm behavior, prompts, models, dependencies, result
names, seeds, or timestamps.

Verification

  • python -m unittest crew_algorithms.wildfire_alg.test_paths -v — 4 tests pass
    under Python 3.10.11;
  • Black check passes for the new modules;
  • Flake8 passes for the new modules;
  • all affected Python modules compile with DeprecationWarning treated as an
    error;
  • git diff --check passes;
  • no hardcoded results\logs or Agent_N\chats.txt paths remain in the affected
    runtime code.

I also repeated the original one-step smoke test against the macOS Unity build
with ML-Agents 2.3.0-exp.3 / communication protocol 1.5.0. It completed with
exit code 0 and produced one coherent result tree containing:

  • data.csv with score 6 and zero API calls/input tokens/output tokens;
  • 504 PNG frames across the 8 expected streams;
  • a 63-frame MPEG-4 render at 600 x 1200, 20 fps, and 3.15 seconds;
  • 506 files in total, with no filename or directory containing a literal
    backslash.

The generated CSV has the same SHA-256 as the pre-fix reference run
(2fe85b5ffbe80cca82c076f8af3964c28ad23fdf2de164d7ca4439d9d7c67712), while
the process now completes without the manual artifact relocation previously
needed for rendering.

@jzr01
jzr01 requested a review from jphyun2019 August 5, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant