-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
72 changed files
with
4,422 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
max-line-length = 104 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 | ||
extend-ignore = E203, W503 | ||
ignore = E203, E226, E266, E501, W503, E265 |
2 changes: 1 addition & 1 deletion
2
.github/ISSUE_TEMPLATE/bug_report.md → .github/ISSUE_TEMPLATE/bug-issue-template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: Bug report | ||
name: Bug issue template | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
|
2 changes: 1 addition & 1 deletion
2
.github/ISSUE_TEMPLATE/feature_request.md → ...SSUE_TEMPLATE/feature-request-template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 1 | ||
labels: | ||
- label: "WIP" | ||
title: "^WIP:.*" | ||
- label: "feature" | ||
branch: "^feature/.*" | ||
- label: "bugfix" | ||
branch: "^bugfix/.*" | ||
- label: "enh" | ||
branch: "^enhance/.*" | ||
- label: "style" | ||
branch: "^style/*" | ||
- label: "docs" | ||
branch: "^docs/*" | ||
- label: "release" | ||
branch: "^release/v[0-9]+[.][0-9]+[.][0-9]+" | ||
- label: "need-to-change-branch-name" | ||
branch: "^(?!^feature/.*$)(?!^bugfix/.*$)(?!^enhance/.*$)(?!^style/.*$)(?!^docs/.*$).*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Automation] Pull Request" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited, reopened, closed] | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: anencore94/[email protected] | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
assign-reviewer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: reviewers | ||
uses: hkusu/review-assign-action@v1 | ||
with: | ||
assignees: ${{ github.actor }} | ||
reviewers: dongminlee94, Clyde21c | ||
max-num-of-reviewers: 2 | ||
draft-keyword: WIP # A keyword in the pull request title to treat as draft pull requests | ||
|
||
size-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: size-label | ||
uses: pascalgn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
IGNORED: "**/component.yaml\n**/__init__.py" | ||
with: | ||
sizes: > | ||
{ | ||
"0": "XS", | ||
"8": "S", | ||
"40": "M", | ||
"110": "L", | ||
"400": "XL", | ||
"1000": "XXL", | ||
"3000": "XXXL" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "Repo CI] Python Code" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.8 | ||
- name: Initial setup | ||
shell: bash -l {0} | ||
run: make init-dev | ||
- uses: pre-commit/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-build-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.8 | ||
- name: Build python package | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel --universal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,4 @@ venv.bak/ | |
runs/ | ||
|
||
# results | ||
results/ | ||
results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: format | ||
name: format | ||
language: system | ||
entry: make format | ||
types: [python] | ||
- id: lint | ||
name: lint | ||
language: system | ||
entry: make lint | ||
types: [python] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-added-large-files | ||
args: ["--maxkb=30000"] | ||
- id: requirements-txt-fixer | ||
|
||
- repo: local | ||
hooks: | ||
- id: format | ||
name: format | ||
language: system | ||
entry: make format | ||
|
||
- repo: local | ||
hooks: | ||
- id: lint | ||
name: lint | ||
language: system | ||
entry: make lint | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.0.1 | ||
hooks: | ||
- id: add-trailing-comma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,45 @@ | ||
GPU := $(shell which nvcc) | ||
ifdef GPU | ||
DEVICE="gpu" | ||
else | ||
DEVICE="cpu" | ||
endif | ||
|
||
STAGED := $(shell git diff --cached --name-only --diff-filter=ACMR -- 'src/***.py' | sed 's| |\\ |g') | ||
|
||
all: format lint | ||
echo 'Makefile for meta-learning-for-everyone repository' | ||
|
||
format: | ||
black . --line-length 104 | ||
isort . | ||
black . | ||
isort . | ||
nbqa black . | ||
nbqa isort . | ||
|
||
lint: | ||
env PYTHONPATH=src/rl2 pytest src/rl2 --pylint --flake8 --mypy | ||
env PYTHONPATH=src/maml pytest src/maml --pylint --flake8 --mypy | ||
env PYTHONPATH=src/pearl pytest src/pearl --pylint --flake8 --mypy | ||
pytest src/ --pylint --flake8 --ignore=src/meta_rl/envs | ||
# nbqa pytest src/ --pylint --flake8 | ||
|
||
lint-all: | ||
pytest src/ --pylint --flake8 --ignore=src/meta_rl/envs --cache-clear | ||
# nbqa pytest src/ --pylint --flake8 --cache-clear | ||
|
||
lint-staged: | ||
ifdef STAGED | ||
pytest $(STAGED) --pylint --flake8 --ignore=src/meta_rl/envs --cache-clear | ||
# nbqa pytest $(STAGED) --pylint --flake8 --cache-clear | ||
else | ||
@echo "No Staged Python File in the src folder" | ||
endif | ||
|
||
init: | ||
pip install -U pip | ||
pip install -U setuptools | ||
pip install -e . | ||
pip install -r requirements-common.txt | ||
pip install -r requirements-$(DEVICE).txt | ||
bash ./hooks/install.sh | ||
|
||
setup: | ||
pip install -r requirements.txt | ||
pre-commit install | ||
init-dev: | ||
make init | ||
pip install -r requirements-dev.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
# Install pre-commit | ||
rm -f $REPO_ROOT/.git/hooks/pre-commit && rm -f $REPO_ROOT/.git/hooks/pre-commit.legacy | ||
pip install pre-commit | ||
cd $REPO_ROOT && pre-commit install |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# According to PEP-518, https://www.python.org/dev/peps/pep-0518/ | ||
# | ||
[build-system] | ||
# Minimum requirements for the build system to execute, according to PEP-508 | ||
requires = [ | ||
"build>=0.7", | ||
"setuptools>=59.4", | ||
"wheel>=0.37" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[requires] | ||
python_version = "3.8" | ||
|
||
[tool.black] | ||
line-length = 104 | ||
target-version = ["py38"] | ||
exclude = "" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
skip_gitignore = true | ||
extend_skip_glob = "" | ||
|
||
[tool.mypy] | ||
disallow_subclassing_any = false | ||
disallow_untyped_decorators = false | ||
ignore_missing_imports = true | ||
no_site_packages = true | ||
strict = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gym>=0.24.1 | ||
higher>=0.2.1 | ||
mujoco-py>=2.1.2.14 | ||
tensorflow-tensorboard==1.5.1 | ||
torchmeta>=1.8.0 | ||
tqdm>=4.62.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
|
||
torch>=1.8.1 |
Oops, something went wrong.