Skip to content

Commit

Permalink
Merge pull request #439 from instadeepai/develop
Browse files Browse the repository at this point in the history
Merge: Merge Dev into Main for Release
  • Loading branch information
KaleabTessera authored Feb 25, 2022
2 parents 80004d3 + 2c8f7f5 commit 424025b
Show file tree
Hide file tree
Showing 286 changed files with 19,668 additions and 11,059 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/3rdparty
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Code owners for repo.

# Default code owners for repo.
* @arnupretorius @KaleabTessera @DriesSmit
* @arnupretorius @KaleabTessera @DriesSmit @mmorris44 @AsadJeewa @RuanJohn @jcformanek

# Add specific code owners for certain files or folders below.
# Specific code owners take precedence over the default ones.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/benchmarking_internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Benchmarking
about: System benchmarking task
title: "[BENCHMARK]"
labels: benchmark
assignees: ''

---

### Describe the benchmarking experiment/task
A clear and concise description of what the task is. If it is an experiment please provide the experimental design.

### Hypothesis/expected behavior or outcome
A clear and concise description of what you expected to happen.

### Definition of done
A precise outline for the experiment or task to be considered complete.

### Mandatory checklist before benchmarking is complete
* [ ] PR for code to benchmark has been created and the label has been changed to benchmark.
* [ ] The success criteria laid down in “Definition of done” are met.
* [ ] Experiment is documented - hyperparameters, plots, conclusions/findings etc.
* [ ] Documentation is updated - README, CONTRIBUTING, or other documentation.
* [ ] Link experiment/benchmarking (optional).

<!-- Base checklist. Don’t hesitate to adapt it to your use-case. -->

### Links / references / screenshots
<!-- For ex: link to CI job, experiment runs, etc. -->
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Report a bug
title: "[BUG]"
labels: bug
assignees: ''

---

### Describe the bug
A clear and concise description of what the bug is.

### To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

### Expected behavior
A clear and concise description of what you expected to happen.

### Context (Environment)
- Mava (and other package versions): result of `pip freeze > requirements.txt`
- OS

### Additional context
Add any other context about the problem here.

### Possible Solution
Not obligatory, but suggest a fix/reason for the bug.
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bugfix_internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug fix
about: Fix a known bug
title: "[BUG]"
labels: bug
assignees: ''

---

### Describe the bug
A clear and concise description of what the bug is.

### To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

### Expected behavior
A clear and concise description of what you expected to happen.

### Context (Environment)
- Mava (and other package versions): result of `pip freeze > requirements.txt`
- OS

Add any other context about the problem here.

### Proposal for a fix
A plan or brief overview of how the feature will be implemented.

### Definition of done
A precise outline for the feature to be considered fully implemented, i.e. done/complete.

### Mandatory checklist before making a PR
* [ ] The success criteria laid down in “Definition of done” are met.
* [ ] Code is documented - docstrings for methods and classes, static types for arguments.
* [ ] Code is tested - unit, integration and/or functional tests are added.
* [ ] Documentation is updated - README, CONTRIBUTING, or other documentation.
* [ ] All functional tests are green.
* [ ] Link experiment/benchmarking after implementation (optional).

<!-- Base checklist. Don’t hesitate to adapt it to your use-case. -->

### Links / references / screenshots
<!-- For ex: link to CI job, experiment runs, etc. -->
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Feature implementation
about: Set scope of work for a new feature implementation
title: '[FEATURE]'
labels: enhancement
assignees: ''

---

### Feature
A clear and concise description of the feature to be implemented and why.

### Proposal
A plan or brief overview of how the feature will be implemented.

### Testing
A detailed description of how this feature will be tested.
* What are the core aspects of the feature that need testing?
* Outline the test cases and for each specify:
* The purpose of the test.
* The inputs.
* The expected output.

### Benchmarking (Optional)
Describe how and why this feature needs to be benchmarked with regards to:
* Performance in metric(s)...
* Speed
* Scale

### Definition of done
A precise outline for the feature to be considered fully implemented, i.e. done/complete.

### Mandatory checklist before making a PR
* [ ] The success criteria laid down in “Definition of done” are met.
* [ ] Code is documented - docstrings for methods and classes, static types for arguments.
* [ ] Code is tested - unit, integration and/or functional tests are added.
* [ ] Documentation is updated - README, CONTRIBUTING, or other documentation.
* [ ] All functional tests are green.
* [ ] Link experiment/benchmarking after implementation (optional).

<!-- Base checklist. Don’t hesitate to adapt it to your use-case. -->

### Links / references / screenshots
<!-- For ex: link to CI job, experiment runs, etc. -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest a feature
title: '[FEATURE]'
labels: enhancement
assignees: ''

---

### Please describe the purpose of the feature. Is it related to a problem?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

### Describe the solution you'd like
A clear and concise description of what you want to happen.

### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

### How do we know when implementation of this feature is complete?
Checklist:
- [ ]
- [ ]

### Additional context
Add any other context about the feature request here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/maintainance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Maintenance
about: Suggest a maintenance task
title: '[MAINTAIN]'
labels: maintenance
assignees: ''

---

### Please describe what needs to be maintained?
A clear and concise description of what the maintenance task is for.

### Describe the outcome you'd like
A clear and concise description of what you want to happen.

### How do we know when maintenance is complete?
Checklist:
- [ ]
- [ ]
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/test_internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Planned test
about: Outline the structure for a planned test, this could be broader system/integration tests or for tests for existing code.
title: '[TEST]'
labels: test
assignees: ''

---

### What do you want to test?
A brief description of the feature to be tested (with a link to the feature issue, if applicable).

### Outline of test structure
* What type of test(s)? i.e. unit, integration, functional.
* Describe the test cases and for each:
* What will be the inputs?
* What is the expected output?

### Definition of done
A precise description for the test(s) to be considered fully implemented, i.e. done/complete.

### Mandatory checklist before making a PR
* [ ] The success criteria laid down in “Definition of done” are met.
* [ ] Test code is documented - docstrings for methods and classes, static types for arguments.
* [ ] Documentation is updated - README, CONTRIBUTING, or other documentation.

<!-- Base checklist. Don’t hesitate to adapt it to your use-case. -->

### Links / references / screenshots
63 changes: 15 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,23 @@ on:
pull_request:
branches: [develop]

# TODO(Kale-ab) Specify mava container to run tests on.
jobs:
test-ubuntu:
runs-on: onprem
timeout-minutes: 30
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
python-version: [3.6.13, 3.7.1, 3.8.0]
docker-image: ["python:3.7","python:3.8","python:3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
export PIP_DEFAULT_TIMEOUT=100
# Ensure encoding consistency
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Mava dependencies
pip uninstall -y enum34
pip install --upgrade pip setuptools
pip install .
pip install .[flatland]
# openspiel
sudo apt-get update
sudo apt-get install clang -y
pip install .[open_spiel]
pip install .[tf,envs,reverb,testing_formatting,launchpad,record_episode]
# For atari envs
sudo apt-get install unrar
pip install autorom
AutoROM -v
# Open CV and Headless screen.
sudo apt-get install ffmpeg libsm6 libxext6 xvfb -y
# SC2
sudo apt-get install git -y
pip install git+https://github.com/oxwhirl/smac.git
- name: Format code
run: |
# Check code follows black formatting.
black --check .
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistics
- name: Check types with mypy
run: |
mypy . --exclude docs/
- name: Test with pytest and get code coverage
run: |
pytest --cov-report term-missing --cov=mava -n "$(grep -c ^processor /proc/cpuinfo)" tests
- name: Checkout mava
uses: actions/checkout@v2
- name: Run tests in docker
run: |
docker run --mount "type=bind,src=$(pwd),dst=/tmp/mava" \
-w "/tmp/mava" --rm ${{ matrix.docker-image }} /bin/bash bash_scripts/tests.sh
- name: Check format and types
run: |
docker run --mount "type=bind,src=$(pwd),dst=/tmp/mava" \
-w "/tmp/mava" --rm ${{ matrix.docker-image }} /bin/bash bash_scripts/check_format.sh
22 changes: 22 additions & 0 deletions .github/workflows/ci_main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: integration-tests

on:
pull_request:
branches: [main]

# TODO(Kale-ab) Specify mava container to run tests on.
jobs:
test-ubuntu:
runs-on: ubuntu-latest
timeout-minutes: 65
strategy:
fail-fast: false
matrix:
docker-image: ["python:3.7","python:3.8","python:3.9"]
steps:
- name: Checkout mava
uses: actions/checkout@v2
- name: Run integration tests in docker
run: |
docker run --mount "type=bind,src=$(pwd),dst=/tmp/mava" \
-w "/tmp/mava" --rm ${{ matrix.docker-image }} /bin/bash bash_scripts/tests.sh true
Loading

0 comments on commit 424025b

Please sign in to comment.