PKU-Alignment / Safe-Policy-Optimization

NeurIPS 2023: Safe Policy Optimization: A benchmark repository for safe reinforcement learning algorithms
https://safe-policy-optimization.readthedocs.io/en/latest/index.html
Apache License 2.0
331 stars 45 forks source link

feat: support makefile test #52

Closed Gaiejj closed 1 year ago

Gaiejj commented 1 year ago

Add two makefile command to support efficient test.

multi-test-benchmark:
    cd safepo/multi_agent && $(PYTHON) benchmark.py --total-steps 2000 --experiment benchmark --num-envs 1 --tasks \
     Safety2x4AntVelocity-v0 Safety4x2AntVelocity-v0 \
     Safety2x3HalfCheetahVelocity-v0 Safety6x1HalfCheetahVelocity-v0 \

single-test-benchmark:
    cd safepo/single_agent && $(PYTHON) benchmark.py --total-steps 2000  --experiment benchmark --num-envs 1 --steps-per-epoch 1000 --tasks \
     SafetyAntVelocity-v1 SafetyHumanoidVelocity-v1 \
     SafetyPointGoal1-v0 SafetyCarButton1-v0 \
codecov[bot] commented 1 year ago

Codecov Report

Merging #52 (2b25c3e) into main (9570307) will increase coverage by 0.04%. Report is 4 commits behind head on main. The diff coverage is 71.42%.

:exclamation: Current head 2b25c3e differs from pull request most recent head fcc8105. Consider uploading reports for the commit fcc8105 to get more accurate results

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   91.58%   91.62%   +0.04%     
==========================================
  Files          26       26              
  Lines        5262     5267       +5     
==========================================
+ Hits         4819     4826       +7     
+ Misses        443      441       -2     
Files Changed Coverage Δ
safepo/multi_agent/happo.py 93.00% <66.66%> (-0.29%) :arrow_down:
safepo/multi_agent/macpo.py 90.76% <66.66%> (+1.39%) :arrow_up:
safepo/multi_agent/mappo.py 93.23% <66.66%> (-0.31%) :arrow_down:
safepo/multi_agent/mappolag.py 93.53% <66.66%> (-0.26%) :arrow_down:
safepo/utils/config.py 54.41% <77.77%> (-0.82%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more