Skip to content

Commit 891fff2

Browse files
New refactor code. Initial push
1 parent e22a374 commit 891fff2

File tree

617 files changed

+24853
-25907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

617 files changed

+24853
-25907
lines changed

.flake8

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
max-line-length = 120
3+
show-source = True
4+
application-import-names = autoPyTorch
5+
exclude =
6+
venv
7+
build

.github/workflows/examples.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Examples
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ubuntu:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.8]
12+
fail-fast: false
13+
max-parallel: 2
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install test dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e .[examples]
25+
which python
26+
pip freeze
27+
- name: Store repository status
28+
id: status-before
29+
run: |
30+
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
31+
- name: Run tests
32+
run: |
33+
python examples/example_tabular_classification.py
34+
python examples/example_image_classification.py

.github/workflows/pre-commit.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: pre-commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run-all-files:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Setup Python 3.7
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.7
14+
- name: Install pre-commit
15+
run: |
16+
pip install pre-commit
17+
pre-commit install
18+
- name: Run pre-commit
19+
run: |
20+
pre-commit run --all-files

.github/workflows/pytest.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ubuntu:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.6, 3.7, 3.8]
12+
fail-fast: false
13+
max-parallel: 2
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install test dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e .[test]
25+
- name: Store repository status
26+
id: status-before
27+
run: |
28+
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
29+
- name: Run tests
30+
run: |
31+
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autoPyTorch --cov-report=xml'; fi
32+
python -m pytest -n 2 --timeout=600 --timeout-method=thread --dist load test -sv $codecov
33+
- name: Check for files left behind by test
34+
if: ${{ always() }}
35+
run: |
36+
before="${{ steps.status-before.outputs.BEFORE }}"
37+
after="$(git status --porcelain -b)"
38+
if [[ "$before" != "$after" ]]; then
39+
echo "git status from before: $before"
40+
echo "git status from after: $after"
41+
echo "Not all generated files have been deleted!"
42+
exit 1
43+
fi
44+
- name: Upload coverage
45+
if: matrix.code-cov && always()
46+
uses: codecov/codecov-action@v1
47+
with:
48+
fail_ci_if_error: true
49+
verbose: true

.gitignore

+134-45
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,140 @@
1-
# Visual Studio
2-
*.vs/*
3-
4-
# Visual Studio Code
5-
*.vscode/*
6-
7-
# Python
8-
*__pycache__*
9-
*.pyc
10-
.ipynb_checkpoints*
11-
12-
# Zipped
13-
*.tar.gz
14-
15-
# Temp
16-
*tmp_models/
17-
18-
#Results
19-
benchmark_results/
20-
benchmark_results_cluster/
21-
ns_credentials*/
22-
configs.json
23-
results.json
24-
outputs/
25-
jobs.txt
26-
.pylintrc
27-
*worker_logs*
28-
29-
# Build
30-
*build/
31-
*autoPyTorch.egg-info
32-
*.simg
33-
.DS_Store
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
3413
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
3579

36-
# Meta GPU
37-
*meta_logs/
38-
runs.log
39-
runs.log.lock
40-
logs*
80+
# IPython
81+
profile_default/
82+
ipython_config.py
4183

42-
# ensemble data
43-
predictions_for_ensemble.npy
44-
test_predictions_for_ensemble.npy
45-
catboost_info
84+
# pyenv
85+
.python-version
4686

47-
# testing
48-
tests.ipynb
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
4993

50-
# venv
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
51107
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# Idea workspace and task
132+
**/.idea/workspace.xml
133+
**/.idea/tasks.xml
134+
135+
# Dask
136+
dask-worker-space/
137+
138+
# Test output
139+
tmp/
140+
.tmp_evaluation

.pre-commit-config.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-mypy
3+
rev: v0.761
4+
hooks:
5+
- id: mypy
6+
args: [--show-error-codes]
7+
name: mypy AutoPyTorch
8+
files: autoPyTorch/.*
9+
- repo: https://gitlab.com/pycqa/flake8
10+
rev: 3.8.3
11+
hooks:
12+
- id: flake8
13+
name: flake8 AutoPyTorch
14+
files: autoPyTorch/.*
15+
additional_dependencies:
16+
- flake8-print==3.1.4
17+
- flake8-import-order
18+
- id: flake8
19+
name: flake8 tests
20+
files: test/.*
21+
additional_dependencies:
22+
- flake8-print==3.1.4
23+
- flake8-import-order

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [2019] The Contributors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

MANIFEST.in

100644100755
+10-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
include *.txt
1+
include requirements.txt
2+
include autoPyTorch/utils/logging.yaml
3+
include autoPyTorch/configs/default_pipeline_options.json
4+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/catboost.json
5+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/rotation_forest.json
6+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/random_forest.json
7+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/knn.json
8+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/svm.json
9+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/extra_trees.json
10+
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/lgb.json

0 commit comments

Comments
 (0)