Skip to content

SWOPP 3#68

Closed
daniprec wants to merge 165 commits into
mainfrom
swopp
Closed

SWOPP 3#68
daniprec wants to merge 165 commits into
mainfrom
swopp

Conversation

@daniprec

@daniprec daniprec commented Jun 9, 2026

Copy link
Copy Markdown
Member

This pull request introduces significant improvements to documentation, workflow automation, and competition infrastructure for the SWOPP3 Weather Routing Benchmark project. The main enhancements include the addition of CodaBench competition assets, expanded and clarified documentation (especially around ERA5 weather data and SWOPP3 pipelines), the introduction of repository-specific Copilot instructions, and updates to the CI workflow and installation instructions.

CodaBench Competition Infrastructure:

  • Added a complete codabench/ directory with all necessary files to host the SWOPP3 Weather Routing Benchmark on CodaBench, including a detailed README.md, competition configuration (competition.yaml), scoring program, starting kit, and a build script for packaging competition bundles. This enables streamlined deployment and reproducibility for the competition. [1] [2] [3]

Documentation Improvements:

  • Expanded the main README.md with a new documentation section, detailed instructions for using ERA5 weather data (including download and benchmark pipelines), and clarified the SWOPP3 ERA5 pipeline and its requirements. This makes it easier for users to understand data dependencies and reproduce benchmark results. [1] [2] [3]

Development Workflow and Automation:

  • Added .github/copilot-instructions.md to define clear conventions and workflow requirements for contributors, including code style, testing, permissions, and commit practices, improving code quality and collaboration.
  • Updated the GitHub Actions workflow: renamed the workflow to post-commit-push, switched the trigger from pull requests to push events, and adjusted the pre-commit hook to run on all files after commits are pushed, ensuring code quality checks are consistently applied. [1] [2]

Installation and Dependency Management:

  • Revised installation instructions in README.md to streamline the process for installing the SWOPP3 performance model and removed lengthy VCS credential setup steps, reducing friction for new users.

Summary of the most important changes:

CodaBench Competition Support

  • Added codabench/ directory with all assets (README, competition.yaml, scoring program, starting kit, build script) for hosting and managing the SWOPP3 Weather Routing Benchmark on CodaBench. [1] [2] [3]

Documentation Enhancements

  • Expanded README.md with new documentation, detailed ERA5 weather data and pipeline instructions, and clarified SWOPP3-specific procedures. [1] [2]
  • Added a documentation link for the Parametric Performance Model.

Workflow and Code Quality

  • Introduced .github/copilot-instructions.md to standardize development workflow, code conventions, and testing requirements.
  • Updated GitHub Actions to run pre-commit checks after push events and on all files, improving CI reliability. [1] [2]

Installation Process

  • Simplified SWOPP3 model installation instructions and removed complex VCS credential setup guidance from the main README.md.

daniprec added 30 commits March 2, 2026 16:42
…lures in BaseAstar and Circumnavigate classes
…inates_and_times functions from simulation.py
daniprec and others added 24 commits March 17, 2026 09:31
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Fewer Bézier control points (4 free instead of 8) produce smoother
curves that cannot self-intersect, eliminating the looping artifacts.
Geographic bounds removed — the reduced K plus land/weather penalties
are sufficient constraints.
Resamples existing optimized tracks to fewer waypoints (50, 100, 200)
and re-evaluates energy to measure reporting resolution sensitivity.
Picks best, median, and worst departures automatically.
…order

- Resample tracks to uniform spacing before scoring
- Use trapezoidal rule for time integration
- Distinguish strong/weak constraint violations
- Fix interpolation order for consistency
- Add numpy-only integration tests for resampling pipeline
- Add weather_penalty_type parameter to optimize() and
  optimize_with_increasing_penalization() ("hard" or "smooth")
- Add --control-points (-K) and --weather-penalty-type CLI flags
- Change SWOPP3 defaults: K=10, weather_penalty_type="smooth"
- Add parametrized test for both penalty types in optimize()
- Update swopp3_slurm.sh to work from /scratch (staged by stage script)
- Add copy-back of results to ~/routetools/output/swopp3_cpu
- Switch staging script to cpu partition
- Fix ruff B007 lint in test_resample_track.py
The count-only threshold (10%) missed Pacific departures where the
optimizer used 2-3x more energy than GC.  Add a per-departure magnitude
check (default 20% excess) so catastrophic outliers are always flagged.

- Add excess_threshold_pct parameter (default 20%)
- Report worst departure with its actual vs GC energy
- Add 4 new tests: large excess, small excess, both checks, count-only
- Wire weather_penalty_sharpness through CMA-ES optimize() chain
- Change ERA5 interpolation order to 3 (tricubic) in swopp3_run.py
- Add sweep_stage_a.py: weather penalty weight/sharpness/sigma0 grid
  on 10 catastrophic-detour Pacific departures (300 runs)
- Add sweep_stage_b.py: sigma0/popsize/maxfevals/K grid on 20
  GC-stuck Pacific departures (480 runs)
- Add SLURM submission scripts for cpu partition on rust
JAX's map_coordinates only supports order<=1. The scorer uses SciPy
(order=3) but the optimizer must stay at order=1.
- sweep_atlantic.py: grid over wpw×sharpness×sigma0×K on 20 Atlantic
  departures (6 detour + 14 representative) = 1200 runs
- slurm_sweep_atlantic.sh: SLURM submission for cpu partition
- swopp3_sweep_results.md: analysis of Pacific Stage A & B results
- Add routetools/interpolate.py: JIT-compatible cubic B-spline that matches
  scipy.ndimage.map_coordinates order=3 exactly (pad+shift prefilter)
- Integrate into ERA5 loader for order>=3
- Add --weather-penalty-weight CLI flag to swopp3_run.py
- Add vangelis_pacific_noconstraint.sh for no-constraint Pacific runs
- Add comprehensive test suite (12 tests)
Subsample every Nth ERA5 timestep at load time. With hourly
Pacific data (8784 timesteps → 11.8 GB JIT constants), stride=3
yields 2928 timesteps (~3.6 GB) fitting comfortably in GPU memory
for XLA compilation.

- _load_datasets() accepts temporal_stride parameter
- Propagated to load_era5_windfield/wavefield/vectorfield
- --temporal-stride CLI option in swopp3_run.py
- Vangelis script updated to use stride=3
temporal_stride=3 caused different energy evaluations on the
same GC route due to coarser weather interpolation.  Switch to
CPU mode where 125 GB system RAM easily fits the 11.8 GB of
JIT constants without needing stride.
feat: final SWOPP3 result improvements (hourly ERA5, weather constraints, EDT land penalty)
@daniprec daniprec requested a review from Copilot June 9, 2026 09:36
@daniprec daniprec self-assigned this Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@daniprec daniprec added the enhancement New feature or request label Jun 9, 2026
@daniprec

daniprec commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Moved to #70

@daniprec daniprec closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants