Skip to content

Commit

Permalink
New refactor code. Initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
franchuterivera committed Jan 22, 2021
1 parent e22a374 commit 891fff2
Show file tree
Hide file tree
Showing 617 changed files with 24,853 additions and 25,907 deletions.
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
max-line-length = 120
show-source = True
application-import-names = autoPyTorch
exclude =
venv
build
34 changes: 34 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Examples

on: [push, pull_request]

jobs:
ubuntu:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
fail-fast: false
max-parallel: 2

steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[examples]
which python
pip freeze
- name: Store repository status
id: status-before
run: |
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
- name: Run tests
run: |
python examples/example_tabular_classification.py
python examples/example_image_classification.py
20 changes: 20 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pre-commit

on: [push, pull_request]

jobs:
run-all-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files
49 changes: 49 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on: [push, pull_request]

jobs:
ubuntu:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
fail-fast: false
max-parallel: 2

steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Store repository status
id: status-before
run: |
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
- name: Run tests
run: |
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autoPyTorch --cov-report=xml'; fi
python -m pytest -n 2 --timeout=600 --timeout-method=thread --dist load test -sv $codecov
- name: Check for files left behind by test
if: ${{ always() }}
run: |
before="${{ steps.status-before.outputs.BEFORE }}"
after="$(git status --porcelain -b)"
if [[ "$before" != "$after" ]]; then
echo "git status from before: $before"
echo "git status from after: $after"
echo "Not all generated files have been deleted!"
exit 1
fi
- name: Upload coverage
if: matrix.code-cov && always()
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
verbose: true
179 changes: 134 additions & 45 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,51 +1,140 @@
# Visual Studio
*.vs/*

# Visual Studio Code
*.vscode/*

# Python
*__pycache__*
*.pyc
.ipynb_checkpoints*

# Zipped
*.tar.gz

# Temp
*tmp_models/

#Results
benchmark_results/
benchmark_results_cluster/
ns_credentials*/
configs.json
results.json
outputs/
jobs.txt
.pylintrc
*worker_logs*

# Build
*build/
*autoPyTorch.egg-info
*.simg
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# Meta GPU
*meta_logs/
runs.log
runs.log.lock
logs*
# IPython
profile_default/
ipython_config.py

# ensemble data
predictions_for_ensemble.npy
test_predictions_for_ensemble.npy
catboost_info
# pyenv
.python-version

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

# venv
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Idea workspace and task
**/.idea/workspace.xml
**/.idea/tasks.xml

# Dask
dask-worker-space/

# Test output
tmp/
.tmp_evaluation
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.761
hooks:
- id: mypy
args: [--show-error-codes]
name: mypy AutoPyTorch
files: autoPyTorch/.*
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
name: flake8 AutoPyTorch
files: autoPyTorch/.*
additional_dependencies:
- flake8-print==3.1.4
- flake8-import-order
- id: flake8
name: flake8 tests
files: test/.*
additional_dependencies:
- flake8-print==3.1.4
- flake8-import-order
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2019] The Contributors
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
11 changes: 10 additions & 1 deletion MANIFEST.in
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
include *.txt
include requirements.txt
include autoPyTorch/utils/logging.yaml
include autoPyTorch/configs/default_pipeline_options.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/catboost.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/rotation_forest.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/random_forest.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/knn.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/svm.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/extra_trees.json
include autoPyTorch/pipeline/components/setup/traditional_ml/classifier_configs/lgb.json
Loading

0 comments on commit 891fff2

Please sign in to comment.