Skip to content

Commit

Permalink
Merge branch 'master' into dtracers-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dtracers authored May 2, 2020
2 parents 03a4ed7 + 454cfd6 commit e268afc
Show file tree
Hide file tree
Showing 29 changed files with 706 additions and 115 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/benchmarking-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Uploads benchmarking data on push to master.

name: Benchmarking (Master)

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
benchtest: [short_sample, short_dropshot, full_rumble, oce_rlcs, intensive_oce_rlcs]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'

- name: Install/Update pip and wheel.
run:
python -m pip install --upgrade pip &&
pip install wheel

- name: Set-up and install protobuf.
run: chmod 777 ./_travis/install-protoc.sh && ./_travis/install-protoc.sh 2.6.1

- name: Install dependencies.
run: pip install -r requirements.txt && pip install -r requirements-test.txt

- name: Initialise.
run: python init.py

- name: Prepare benchmark.
run: |
pip install -r requirements.txt && pip install -r requirements-test.txt
cd carball/tests/benchmarking
echo === BENCHMARK DIRECTORY ===
ls -lh
echo ===========================
- name: Run benchmark.
run: |
cd carball/tests/benchmarking
pytest benchmarking.py --benchmark-json carball_benchmarking.json -k 'test_${{matrix.benchtest}}'
# REQUIRES gh-pages BRANCH IN THE MAIN REPO (for the graphs).
- name: Process and store benchmark ${{matrix.benchtest}}.
if: contains(github.ref, 'master')
uses: rhysd/github-action-benchmark@v1
with:
name: Carball Benchmarks ${{matrix.benchtest}}
tool: 'pytest'
output-file-path: carball/tests/benchmarking/carball_benchmarking.json
benchmark-data-dir-path: dev/bench/${{matrix.benchtest}}/
# Use personal access token instead of GITHUB_TOKEN due to
# https://git.luolix.topmunity/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
github-token: ${{ secrets.GH_WIKI_EDIT_TOKEN }}
auto-push: true
alert-threshold: '125%' # If performance is 1.25x worse, there will be an alert
comment-always: false
comment-on-alert: false # I think benchmarking.yml takes care of this.
61 changes: 61 additions & 0 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Comment performance benchmarking on every push.

name: Benchmarking

on: push

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
benchtest: [short_sample, short_dropshot, full_rumble, oce_rlcs, intensive_oce_rlcs]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'

- name: Install/Update pip and wheel.
run:
python -m pip install --upgrade pip &&
pip install wheel

- name: Set-up and install protobuf.
run: chmod 777 ./_travis/install-protoc.sh && ./_travis/install-protoc.sh 2.6.1

- name: Install dependencies.
run: pip install -r requirements.txt && pip install -r requirements-test.txt

- name: Initialise.
run: python init.py

- name: Prepare benchmark.
run: |
pip install -r requirements.txt && pip install -r requirements-test.txt
cd carball/tests/benchmarking
echo === BENCHMARK DIRECTORY ===
ls -lh
echo ===========================
- name: Run benchmark.
run: |
cd carball/tests/benchmarking
pytest benchmarking.py --benchmark-json carball_benchmarking.json -k 'test_${{matrix.benchtest}}'
- name: Process and store benchmark ${{matrix.benchtest}}.
uses: rhysd/github-action-benchmark@v1
with:
name: Carball Benchmarks ${{matrix.benchtest}}
tool: 'pytest'
output-file-path: carball/tests/benchmarking/carball_benchmarking.json
benchmark-data-dir-path: dev/bench/${{matrix.benchtest}}/
# Use personal access token instead of GITHUB_TOKEN due to
# https://git.luolix.topmunity/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
alert-threshold: '125%' # If performance is 1.25x worse, there will be an alert
comment-always: true
fail-on-alert: true
44 changes: 44 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update and upload DataFrame information.

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified

- name: Install/Update pip and wheel.
run:
python -m pip install --upgrade pip &&
pip install wheel

- name: Set-up and install protobuf.
run: chmod 777 ./_travis/install-protoc.sh && ./_travis/install-protoc.sh 2.6.1

- name: Install dependencies.
run: pip install -r requirements.txt

- name: Initialise.
run: python init.py

- name: Create document
run: python -m carball.tests.docs.data_frame_docs

- name: wiki-page-creator-action
uses: Decathlon/wiki-page-creator-action@v2.0.0
env:
GH_PAT: ${{ secrets.GH_WIKI_EDIT_TOKEN }}
ACTION_MAIL: saltie.calculated.gg@gmail.com
ACTION_NAME: saltie
OWNER: SaltieRL
REPO_NAME: carball
MD_FOLDER: carball/tests/docs/
SKIP_MD: df_methods.md, df_summary.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dist/
*ipynb*

!/carball/tests/replays/
.vscode
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: python
python:
- '3.6'
- '3.7'
- '3.8'

addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion CARBALL_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
35
36
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ with gzip.open(os.path.join('output.gzip'), 'wb') as fo:
# return the proto object in python
proto_object = analysis_manager.get_protobuf_data()

# return the proto object as a json object
json_oject = analysis_manager.get_json_data()

# return the pandas data frame in python
dataframe = analysis_manager.get_data_frame()
```
Expand Down
7 changes: 6 additions & 1 deletion _travis/install-protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ unzip protobuf-${protoc_version}.zip
cd protobuf-${protoc_version}
echo "CONFIGURING PROTOBUF"
./configure
echo "COMPILING PROTOBUF"
echo "COMPILING and INSTALLING PROTOBUF and SHARED LIBRARIES (.libs)"
make
make check
sudo make install
sudo ldconfig
echo "GETTING PROTOBUF VERSION"
./src/protoc --version
echo "CLEANING UP"
Expand All @@ -25,3 +28,5 @@ pwd
ls -lh
echo "COPYING PROTOBUF TO NEW DIRECTORY"
cp ./protobuf-${protoc_version}/src/protoc carball/generated/binaries
cd carball/generated/binaries
ls -lh
Loading

5 comments on commit e268afc

@github-actions
Copy link

Choose a reason for hiding this comment

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

Carball Benchmarks short_sample

Benchmark suite Current: e268afc Previous: 454cfd6 Ratio
carball/tests/benchmarking/benchmarking.py::test_short_sample 0.8586509155344328 iter/sec (stddev: 0.025246272917020557) 0.8334493276479993 iter/sec (stddev: 0.018728356055060735) 0.97

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Carball Benchmarks short_dropshot

Benchmark suite Current: e268afc Previous: 454cfd6 Ratio
carball/tests/benchmarking/benchmarking.py::test_short_dropshot 0.5936890944487837 iter/sec (stddev: 0.021662698604966373) 0.5608396631341442 iter/sec (stddev: 0.012052625398053523) 0.94

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Carball Benchmarks intensive_oce_rlcs

Benchmark suite Current: e268afc Previous: 454cfd6 Ratio
carball/tests/benchmarking/benchmarking.py::test_intensive_oce_rlcs 0.05381584874226661 iter/sec (stddev: 0.2421837111887458) 0.05268577788019987 iter/sec (stddev: 0.36586274061110863) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Carball Benchmarks oce_rlcs

Benchmark suite Current: e268afc Previous: 454cfd6 Ratio
carball/tests/benchmarking/benchmarking.py::test_oce_rlcs 0.05935386664288294 iter/sec (stddev: 0.34827165482954603) 0.055540758648192336 iter/sec (stddev: 0.30932987465593165) 0.94

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Carball Benchmarks full_rumble

Benchmark suite Current: e268afc Previous: 454cfd6 Ratio
carball/tests/benchmarking/benchmarking.py::test_full_rumble 0.05371325479728216 iter/sec (stddev: 0.7676070272941806) 0.05418737453762949 iter/sec (stddev: 0.13742479332585428) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.