From 9dd60ffddf8a1d8f010fa5a24300d7d116b5bec9 Mon Sep 17 00:00:00 2001 From: Christian Puhrsch Date: Tue, 28 Apr 2020 13:56:27 -0700 Subject: [PATCH] Re-sync with internal repository --- .circleci/config.yml | 597 ------------------ .circleci/config.yml.in | 263 -------- .circleci/docker/Dockerfile | 36 -- .circleci/regenerate.py | 124 ---- .circleci/test/test_sort_yaml.py | 14 - .clang-format | 88 --- .clang-tidy | 33 - .flake8 | 4 - .github/ISSUE_TEMPLATE/bug-report.md | 53 -- .github/ISSUE_TEMPLATE/documentation.md | 9 - .github/ISSUE_TEMPLATE/feature-request.md | 24 - .../ISSUE_TEMPLATE/questions-help-support.md | 13 - .gitignore | 123 ---- .python3 | 0 .travis.yml | 36 -- 15 files changed, 1417 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/config.yml.in delete mode 100644 .circleci/docker/Dockerfile delete mode 100755 .circleci/regenerate.py delete mode 100755 .circleci/test/test_sort_yaml.py delete mode 100644 .clang-format delete mode 100644 .clang-tidy delete mode 100644 .flake8 delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/documentation.md delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md delete mode 100644 .github/ISSUE_TEMPLATE/questions-help-support.md delete mode 100644 .gitignore create mode 100644 .python3 delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b62bb37c12..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,597 +0,0 @@ -version: 2.1 - -# How to test the Linux jobs: -# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 -# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. -# Job names are 'name:' key. - -orbs: - win: circleci/windows@2.0.0 - -binary_common: &binary_common - parameters: - # Edit these defaults to do a release - build_version: - description: "version number of release binary; by default, build a nightly" - type: string - default: "0.5.0" - pytorch_version: - description: "PyTorch version to build against; by default, use a nightly" - type: string - default: "1.5.0" - # Don't edit these - python_version: - description: "Python version to build against (e.g., 3.8)" - type: string - unicode_abi: - description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" - type: string - default: "" - environment: - PYTHON_VERSION: << parameters.python_version >> - BUILD_VERSION: << parameters.build_version >> - PYTORCH_VERSION: << parameters.pytorch_version >> - UNICODE_ABI: << parameters.unicode_abi >> - CU_VERSION: cpu - -smoke_test_common: &smoke_test_common - <<: *binary_common - docker: - - image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchaudio/smoke_test:d26af7d0-8458-face-book-84239b5c75c0 - aws_auth: - aws_access_key_id: ${ECR_AWS_ACCESS_KEY} - aws_secret_access_key: ${ECR_AWS_SECRET_ACCESS_KEY} - -jobs: - circleci_consistency: - docker: - - image: circleci/python:3.8 - steps: - - checkout - - run: - command: | - pip install --user --progress-bar off jinja2 pyyaml - python .circleci/regenerate.py - git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) - - binary_linux_wheel: - <<: *binary_common - docker: - - image: "pytorch/manylinux-cuda100" - resource_class: 2xlarge+ - steps: - - checkout - - run: packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - binary_linux_conda: - <<: *binary_common - docker: - - image: "pytorch/conda-cuda" - resource_class: 2xlarge+ - steps: - - checkout - - run: packaging/build_conda.sh - - store_artifacts: - path: /opt/conda/conda-bld/linux-64 - - persist_to_workspace: - root: /opt/conda/conda-bld/linux-64 - paths: - - "*" - - binary_win_conda: - <<: *binary_common - executor: - name: win/default - shell: bash.exe - steps: - - checkout - - run: - command: | - choco install miniconda3 - (& "C:\tools\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression - conda activate base - conda install -yq conda-build "conda-package-handling!=1.5.0" - bash packaging/build_conda.sh - shell: powershell.exe - - binary_macos_wheel: - <<: *binary_common - macos: - xcode: "9.0" - steps: - - checkout - - run: - # Cannot easily deduplicate this as source'ing activate - # will set environment variables which we need to propagate - # to build_wheel.sh - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - binary_macos_conda: - <<: *binary_common - macos: - xcode: "9.0" - steps: - - checkout - - run: - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - conda install -yq conda-build - packaging/build_conda.sh - - store_artifacts: - path: /Users/distiller/miniconda3/conda-bld/osx-64 - - persist_to_workspace: - root: /Users/distiller/miniconda3/conda-bld/osx-64 - paths: - - "*" - - # Requires org-member context - binary_conda_upload: - docker: - - image: continuumio/miniconda - steps: - - attach_workspace: - at: ~/workspace - - run: - command: | - # Prevent credential from leaking - conda install -yq anaconda-client - set -x - anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/*.tar.bz2 -u pytorch-nightly --label main --no-progress --force - - # Requires org-member context - binary_wheel_upload: - docker: - - image: circleci/python:3.8 - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run: - command: | - pip install --user awscli - export PATH="$HOME/.local/bin:$PATH" - # Prevent credential from leaking - set +x - export AWS_ACCESS_KEY_ID="${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}" - export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}" - set -x - for pkg in ~/workspace/*.whl; do - aws s3 cp "$pkg" "s3://pytorch/whl/nightly/" --acl public-read - done - - smoke_test_linux_conda: - <<: *smoke_test_common - steps: - - attach_workspace: - at: ~/workspace - - run: - name: install binaries - command: | - set -x - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - conda install -v -y -c pytorch-nightly pytorch - conda install -v -y $(ls ~/workspace/torchaudio*.tar.bz2) - - run: - name: smoke test - command: | - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - python -c "import torchaudio" - - smoke_test_linux_pip: - <<: *smoke_test_common - steps: - - attach_workspace: - at: ~/workspace - - run: - name: install binaries - command: | - set -x - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - pip install $(ls ~/workspace/torchaudio*.whl) -f https://download.pytorch.org/whl/nightly/torch_nightly.html - - run: - name: smoke test - command: | - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - python -c "import torchaudio" - - docker_image_build: - machine: - image: ubuntu-1604:201903-01 - resource_class: large - environment: - image_name: torchaudio/smoke_test - steps: - - checkout - - run: - name: build_docker image - no_output_timeout: "1h" - command: | - cd .circleci/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} - - run: - name: upload docker image - no_output_timeout: "1h" - command: | - set +x - export AWS_ACCESS_KEY_ID=${ECR_AWS_ACCESS_KEY} - export AWS_SECRET_ACCESS_KEY=${ECR_AWS_SECRET_ACCESS_KEY} - eval $(aws ecr get-login --region us-east-1 --no-include-email) - set -x - docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} 308535385114.dkr.ecr.us-east-1.amazonaws.com/${image_name}:${CIRCLE_WORKFLOW_ID} - docker push 308535385114.dkr.ecr.us-east-1.amazonaws.com/${image_name}:${CIRCLE_WORKFLOW_ID} - -workflows: - build: - jobs: - - circleci_consistency - - binary_linux_wheel: - name: binary_linux_wheel_py3.5 - python_version: '3.5' - - binary_linux_wheel: - name: binary_linux_wheel_py3.6 - python_version: '3.6' - - binary_linux_wheel: - name: binary_linux_wheel_py3.7 - python_version: '3.7' - - binary_linux_wheel: - name: binary_linux_wheel_py3.8 - python_version: '3.8' - - binary_macos_wheel: - name: binary_macos_wheel_py3.5 - python_version: '3.5' - - binary_macos_wheel: - name: binary_macos_wheel_py3.6 - python_version: '3.6' - - binary_macos_wheel: - name: binary_macos_wheel_py3.7 - python_version: '3.7' - - binary_macos_wheel: - name: binary_macos_wheel_py3.8 - python_version: '3.8' - - binary_linux_conda: - name: binary_linux_conda_py3.5 - python_version: '3.5' - - binary_linux_conda: - name: binary_linux_conda_py3.6 - python_version: '3.6' - - binary_linux_conda: - name: binary_linux_conda_py3.7 - python_version: '3.7' - - binary_linux_conda: - name: binary_linux_conda_py3.8 - python_version: '3.8' - - binary_macos_conda: - name: binary_macos_conda_py3.5 - python_version: '3.5' - - binary_macos_conda: - name: binary_macos_conda_py3.6 - python_version: '3.6' - - binary_macos_conda: - name: binary_macos_conda_py3.7 - python_version: '3.7' - - binary_macos_conda: - name: binary_macos_conda_py3.8 - python_version: '3.8' - - binary_win_conda: - name: torchaudio_win_py3.6 - python_version: "3.6" - - nightly: - jobs: - - circleci_consistency - - binary_linux_wheel: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5 - python_version: '3.5' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_upload - requires: - - nightly_binary_linux_wheel_py3.5 - - smoke_test_linux_pip: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_smoke_test_pip - python_version: '3.5' - requires: - - nightly_binary_linux_wheel_py3.5_upload - - binary_linux_wheel: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6 - python_version: '3.6' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_upload - requires: - - nightly_binary_linux_wheel_py3.6 - - smoke_test_linux_pip: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_smoke_test_pip - python_version: '3.6' - requires: - - nightly_binary_linux_wheel_py3.6_upload - - binary_linux_wheel: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_upload - requires: - - nightly_binary_linux_wheel_py3.7 - - smoke_test_linux_pip: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_smoke_test_pip - python_version: '3.7' - requires: - - nightly_binary_linux_wheel_py3.7_upload - - binary_linux_wheel: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8 - python_version: '3.8' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_upload - requires: - - nightly_binary_linux_wheel_py3.8 - - smoke_test_linux_pip: - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_smoke_test_pip - python_version: '3.8' - requires: - - nightly_binary_linux_wheel_py3.8_upload - - binary_macos_wheel: - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.5 - python_version: '3.5' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.5_upload - requires: - - nightly_binary_macos_wheel_py3.5 - - binary_macos_wheel: - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.6 - python_version: '3.6' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.6_upload - requires: - - nightly_binary_macos_wheel_py3.6 - - binary_macos_wheel: - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.7 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.7_upload - requires: - - nightly_binary_macos_wheel_py3.7 - - binary_macos_wheel: - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.8 - python_version: '3.8' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.8_upload - requires: - - nightly_binary_macos_wheel_py3.8 - - binary_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5 - python_version: '3.5' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_upload - requires: - - nightly_binary_linux_conda_py3.5 - - smoke_test_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_smoke_test_conda - python_version: '3.5' - requires: - - nightly_binary_linux_conda_py3.5_upload - - binary_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6 - python_version: '3.6' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_upload - requires: - - nightly_binary_linux_conda_py3.6 - - smoke_test_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_smoke_test_conda - python_version: '3.6' - requires: - - nightly_binary_linux_conda_py3.6_upload - - binary_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_upload - requires: - - nightly_binary_linux_conda_py3.7 - - smoke_test_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_smoke_test_conda - python_version: '3.7' - requires: - - nightly_binary_linux_conda_py3.7_upload - - binary_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8 - python_version: '3.8' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_upload - requires: - - nightly_binary_linux_conda_py3.8 - - smoke_test_linux_conda: - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_smoke_test_conda - python_version: '3.8' - requires: - - nightly_binary_linux_conda_py3.8_upload - - binary_macos_conda: - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.5 - python_version: '3.5' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.5_upload - requires: - - nightly_binary_macos_conda_py3.5 - - binary_macos_conda: - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.6 - python_version: '3.6' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.6_upload - requires: - - nightly_binary_macos_conda_py3.6 - - binary_macos_conda: - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.7 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.7_upload - requires: - - nightly_binary_macos_conda_py3.7 - - binary_macos_conda: - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.8 - python_version: '3.8' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.8_upload - requires: - - nightly_binary_macos_conda_py3.8 - docker_build: - triggers: - - schedule: - cron: "0 10 * * 0" - filters: - branches: - only: - - master - jobs: - - docker_image_build \ No newline at end of file diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in deleted file mode 100644 index fb3316969a..0000000000 --- a/.circleci/config.yml.in +++ /dev/null @@ -1,263 +0,0 @@ -version: 2.1 - -# How to test the Linux jobs: -# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 -# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. -# Job names are 'name:' key. - -orbs: - win: circleci/windows@2.0.0 - -binary_common: &binary_common - parameters: - # Edit these defaults to do a release - build_version: - description: "version number of release binary; by default, build a nightly" - type: string - default: "0.5.0" - pytorch_version: - description: "PyTorch version to build against; by default, use a nightly" - type: string - default: "1.5.0" - # Don't edit these - python_version: - description: "Python version to build against (e.g., 3.8)" - type: string - unicode_abi: - description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" - type: string - default: "" - environment: - PYTHON_VERSION: << parameters.python_version >> - BUILD_VERSION: << parameters.build_version >> - PYTORCH_VERSION: << parameters.pytorch_version >> - UNICODE_ABI: << parameters.unicode_abi >> - CU_VERSION: cpu - -smoke_test_common: &smoke_test_common - <<: *binary_common - docker: - - image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchaudio/smoke_test:d26af7d0-8458-face-book-84239b5c75c0 - aws_auth: - aws_access_key_id: ${ECR_AWS_ACCESS_KEY} - aws_secret_access_key: ${ECR_AWS_SECRET_ACCESS_KEY} - -jobs: - circleci_consistency: - docker: - - image: circleci/python:3.8 - steps: - - checkout - - run: - command: | - pip install --user --progress-bar off jinja2 pyyaml - python .circleci/regenerate.py - git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) - - binary_linux_wheel: - <<: *binary_common - docker: - - image: "pytorch/manylinux-cuda100" - resource_class: 2xlarge+ - steps: - - checkout - - run: packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - binary_linux_conda: - <<: *binary_common - docker: - - image: "pytorch/conda-cuda" - resource_class: 2xlarge+ - steps: - - checkout - - run: packaging/build_conda.sh - - store_artifacts: - path: /opt/conda/conda-bld/linux-64 - - persist_to_workspace: - root: /opt/conda/conda-bld/linux-64 - paths: - - "*" - - binary_win_conda: - <<: *binary_common - executor: - name: win/default - shell: bash.exe - steps: - - checkout - - run: - command: | - choco install miniconda3 - (& "C:\tools\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression - conda activate base - conda install -yq conda-build "conda-package-handling!=1.5.0" - bash packaging/build_conda.sh - shell: powershell.exe - - binary_macos_wheel: - <<: *binary_common - macos: - xcode: "9.0" - steps: - - checkout - - run: - # Cannot easily deduplicate this as source'ing activate - # will set environment variables which we need to propagate - # to build_wheel.sh - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - binary_macos_conda: - <<: *binary_common - macos: - xcode: "9.0" - steps: - - checkout - - run: - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - conda install -yq conda-build - packaging/build_conda.sh - - store_artifacts: - path: /Users/distiller/miniconda3/conda-bld/osx-64 - - persist_to_workspace: - root: /Users/distiller/miniconda3/conda-bld/osx-64 - paths: - - "*" - - # Requires org-member context - binary_conda_upload: - docker: - - image: continuumio/miniconda - steps: - - attach_workspace: - at: ~/workspace - - run: - command: | - # Prevent credential from leaking - conda install -yq anaconda-client - set -x - anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/*.tar.bz2 -u pytorch-nightly --label main --no-progress --force - - # Requires org-member context - binary_wheel_upload: - docker: - - image: circleci/python:3.8 - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run: - command: | - pip install --user awscli - export PATH="$HOME/.local/bin:$PATH" - # Prevent credential from leaking - set +x - export AWS_ACCESS_KEY_ID="${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}" - export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}" - set -x - for pkg in ~/workspace/*.whl; do - aws s3 cp "$pkg" "s3://pytorch/whl/nightly/" --acl public-read - done - - smoke_test_linux_conda: - <<: *smoke_test_common - steps: - - attach_workspace: - at: ~/workspace - - run: - name: install binaries - command: | - set -x - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - conda install -v -y -c pytorch-nightly pytorch - conda install -v -y $(ls ~/workspace/torchaudio*.tar.bz2) - - run: - name: smoke test - command: | - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - python -c "import torchaudio" - - smoke_test_linux_pip: - <<: *smoke_test_common - steps: - - attach_workspace: - at: ~/workspace - - run: - name: install binaries - command: | - set -x - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - pip install $(ls ~/workspace/torchaudio*.whl) -f https://download.pytorch.org/whl/nightly/torch_nightly.html - - run: - name: smoke test - command: | - source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - python -c "import torchaudio" - - docker_image_build: - machine: - image: ubuntu-1604:201903-01 - resource_class: large - environment: - image_name: torchaudio/smoke_test - steps: - - checkout - - run: - name: build_docker image - no_output_timeout: "1h" - command: | - cd .circleci/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} - - run: - name: upload docker image - no_output_timeout: "1h" - command: | - set +x - export AWS_ACCESS_KEY_ID=${ECR_AWS_ACCESS_KEY} - export AWS_SECRET_ACCESS_KEY=${ECR_AWS_SECRET_ACCESS_KEY} - eval $(aws ecr get-login --region us-east-1 --no-include-email) - set -x - docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} 308535385114.dkr.ecr.us-east-1.amazonaws.com/${image_name}:${CIRCLE_WORKFLOW_ID} - docker push 308535385114.dkr.ecr.us-east-1.amazonaws.com/${image_name}:${CIRCLE_WORKFLOW_ID} - -workflows: - build: - jobs: - - circleci_consistency - {{ workflows() }} - - binary_win_conda: - name: torchaudio_win_py3.6 - python_version: "3.6" - - nightly: - jobs: - - circleci_consistency - {{ workflows(prefix="nightly_", filter_branch="nightly", upload=True) }} - docker_build: - triggers: - - schedule: - cron: "0 10 * * 0" - filters: - branches: - only: - - master - jobs: - - docker_image_build diff --git a/.circleci/docker/Dockerfile b/.circleci/docker/Dockerfile deleted file mode 100644 index 6066668694..0000000000 --- a/.circleci/docker/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# this Dockerfile is for torchaudio smoke test, it will be created periodically via CI system -# if you need to do it locally, follow below steps once you have Docker installed -# assuming you're within the directory where this Dockerfile located -# $ docker build . -t torchaudio/smoketest - -# if you want to push to aws ecr, make sure you have the rights to write to ECR, then run -# $ eval $(aws ecr get-login --region us-east-1 --no-include-email) -# $ export MYTAG=localbuild ## you can choose whatever tag you like -# $ docker tag torchaudio/smoketest 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchaudio/smoke_test:${MYTAG} -# $ docker push 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchaudio/smoke_test:${MYTAG} - -FROM ubuntu:latest - -RUN apt-get -qq update && apt-get -qq -y install curl bzip2 sox libsox-dev libsox-fmt-all \ - && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \ - && bash /tmp/miniconda.sh -bfp /usr/local \ - && rm -rf /tmp/miniconda.sh \ - && conda install -y python=3 \ - && conda update conda \ - && apt-get -qq -y remove curl bzip2 \ - && apt-get -qq -y autoremove \ - && apt-get autoclean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \ - && conda clean --all --yes - -ENV PATH /opt/conda/bin:$PATH - -RUN conda create -y --name python3.5 python=3.5 -RUN conda create -y --name python3.6 python=3.6 -RUN conda create -y --name python3.7 python=3.7 -SHELL [ "/bin/bash", "-c" ] -RUN echo "source /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.5 && conda install -y -c conda-forge sox && conda install -y numpy -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.6 && conda install -y -c conda-forge sox && conda install -y numpy -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.7 && conda install -y -c conda-forge sox && conda install -y numpy -CMD [ "/bin/bash"] diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py deleted file mode 100755 index 19f52be756..0000000000 --- a/.circleci/regenerate.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python3 - -""" -This script should use a very simple, functional programming style. -Avoid Jinja macros in favor of native Python functions. - -Don't go overboard on code generation; use Python only to generate -content that can't be easily declared statically using CircleCI's YAML API. - -Data declarations (e.g. the nested loops for defining the configuration matrix) -should be at the top of the file for easy updating. - -See this comment for design rationale: -https://github.com/pytorch/vision/pull/1321#issuecomment-531033978 -""" - -import jinja2 -import yaml -import os.path - - -def workflows(prefix='', upload=False, filter_branch=None, indentation=6): - w = [] - for btype in ["wheel", "conda"]: - for os_type in ["linux", "macos"]: - for python_version in ["3.5", "3.6", "3.7", "3.8"]: - for unicode in ([False, True] if btype == "wheel" and python_version == "2.7" else [False]): - w += workflow_pair(btype, os_type, python_version, unicode, filter_branch, prefix, upload) - - return indent(indentation, w) - - -def workflow_pair(btype, os_type, python_version, unicode, filter_branch, prefix='', upload=False): - - w = [] - unicode_suffix = "_unicode" if unicode else "" - base_workflow_name = "{prefix}binary_{os_type}_{btype}_py{python_version}{unicode_suffix}".format( - prefix=prefix, - os_type=os_type, - btype=btype, - python_version=python_version, - unicode_suffix=unicode_suffix) - - w.append(generate_base_workflow(base_workflow_name, python_version, unicode, filter_branch, os_type, btype)) - - if upload: - - is_py3_linux = os_type == 'linux' and not python_version.startswith("2.") - - w.append(generate_upload_workflow(base_workflow_name, filter_branch, btype)) - - if filter_branch == 'nightly' and is_py3_linux: - pydistro = 'pip' if btype == 'wheel' else 'conda' - w.append(generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version)) - - return w - - -def generate_base_workflow(base_workflow_name, python_version, unicode, filter_branch, os_type, btype): - - d = { - "name": base_workflow_name, - "python_version": python_version, - } - - if unicode: - d["unicode_abi"] = '1' - - if filter_branch: - d["filters"] = gen_filter_branch_tree(filter_branch) - - return {"binary_{os_type}_{btype}".format(os_type=os_type, btype=btype): d} - - -def gen_filter_branch_tree(branch_name): - return {"branches": {"only": branch_name}} - - -def generate_upload_workflow(base_workflow_name, filter_branch, btype): - d = { - "name": "{base_workflow_name}_upload".format(base_workflow_name=base_workflow_name), - "context": "org-member", - "requires": [base_workflow_name], - } - - if filter_branch: - d["filters"] = gen_filter_branch_tree(filter_branch) - - return {"binary_{btype}_upload".format(btype=btype): d} - - -def generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version): - - required_build_suffix = "_upload" - required_build_name = base_workflow_name + required_build_suffix - - smoke_suffix = "smoke_test_{pydistro}".format(pydistro=pydistro) - d = { - "name": "{base_workflow_name}_{smoke_suffix}".format( - base_workflow_name=base_workflow_name, smoke_suffix=smoke_suffix), - "requires": [required_build_name], - "python_version": python_version, - } - - if filter_branch: - d["filters"] = gen_filter_branch_tree(filter_branch) - - return {"smoke_test_linux_{pydistro}".format(pydistro=pydistro): d} - - -def indent(indentation, data_list): - return ("\n" + " " * indentation).join(yaml.dump(data_list).splitlines()) - - -if __name__ == "__main__": - d = os.path.dirname(__file__) - env = jinja2.Environment( - loader=jinja2.FileSystemLoader(d), - lstrip_blocks=True, - autoescape=False, - ) - - with open(os.path.join(d, 'config.yml'), 'w') as f: - f.write(env.get_template('config.yml.in').render(workflows=workflows)) diff --git a/.circleci/test/test_sort_yaml.py b/.circleci/test/test_sort_yaml.py deleted file mode 100755 index dc6db481dd..0000000000 --- a/.circleci/test/test_sort_yaml.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 - -""" -To compare new version with previous: - - ./regenerate.sh - meld <(git show HEAD:./config.yml | ./sort-yaml.py) <(cat config.yml | ./sort-yaml.py) -""" - - -import sys -import yaml - -sys.stdout.write(yaml.dump(yaml.load(sys.stdin, Loader=yaml.FullLoader), sort_keys=True)) diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 73304266bd..0000000000 --- a/.clang-format +++ /dev/null @@ -1,88 +0,0 @@ ---- -AccessModifierOffset: -1 -AlignAfterOpenBracket: AlwaysBreak -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true -AlignOperands: false -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Empty -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: true -BinPackArguments: false -BinPackParameters: false -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: false -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ] -IncludeCategories: - - Regex: '^<.*\.h(pp)?>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IndentCaseLabels: true -IndentWidth: 2 -IndentWrappedFunctionNames: false -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: false -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 2000000 -PointerAlignment: Left -ReflowComments: true -SortIncludes: true -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never -... diff --git a/.clang-tidy b/.clang-tidy deleted file mode 100644 index a3a40b5907..0000000000 --- a/.clang-tidy +++ /dev/null @@ -1,33 +0,0 @@ ---- -# NOTE there must be no spaces before the '-', so put the comma first. -Checks: ' - -* - ,bugprone-* - ,-bugprone-forward-declaration-namespace - ,-bugprone-macro-parentheses - ,cppcoreguidelines-* - ,-cppcoreguidelines-interfaces-global-init - ,-cppcoreguidelines-owning-memory - ,-cppcoreguidelines-pro-bounds-array-to-pointer-decay - ,-cppcoreguidelines-pro-bounds-constant-array-index - ,-cppcoreguidelines-pro-bounds-pointer-arithmetic - ,-cppcoreguidelines-pro-type-cstyle-cast - ,-cppcoreguidelines-pro-type-reinterpret-cast - ,-cppcoreguidelines-pro-type-static-cast-downcast - ,-cppcoreguidelines-pro-type-union-access - ,-cppcoreguidelines-pro-type-vararg - ,-cppcoreguidelines-special-member-functions - ,hicpp-exception-baseclass - ,hicpp-avoid-goto - ,modernize-* - ,-modernize-return-braced-init-list - ,-modernize-use-auto - ,-modernize-use-default-member-init - ,-modernize-use-using - ,performance-unnecessary-value-param - ' -WarningsAsErrors: '*' -HeaderFilterRegex: 'torchaudio/.*' -AnalyzeTemporaryDtors: false -CheckOptions: -... diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 388d81d723..0000000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-line-length = 120 -ignore = E305,E402,E721,E741,F401,F403,F405,F999,W503,W504 -exclude = build,docs/source,_ext diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index fb50bd8504..0000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -name: "\U0001F41B Bug Report" -about: Submit a bug report to help us improve Torchaudio - ---- - -## ๐Ÿ› Bug - - - -## To Reproduce - -Steps to reproduce the behavior: - -1. -1. -1. - - - -## Expected behavior - - - -## Environment - - - What commands did you used to install torchaudio (conda/pip/build from source)? - - If you are building from source, which commit is it? - - What does `torchaudio.__version__` print? (If applicable) - -Please copy and paste the output from our -[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py) -(or fill out the checklist below manually). - -You can get the script and run it with: -``` -wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py -# For security purposes, please check the contents of collect_env.py before running it. -python collect_env.py -``` - - - PyTorch Version (e.g., 1.0): - - OS (e.g., Linux): - - How you installed PyTorch (`conda`, `pip`, source): - - Build command you used (if compiling from source): - - Python version: - - CUDA/cuDNN version: - - GPU models and configuration: - - Any other relevant information: - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index ae745121c5..0000000000 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: "\U0001F4DA Documentation" -about: Report an issue related to https://pytorch.org/audio - ---- - -## ๐Ÿ“š Documentation - - diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index f3896e5368..0000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: "\U0001F680Feature Request" -about: Submit a proposal/request for a new Torchaudio feature - ---- - -## ๐Ÿš€ Feature - - -## Motivation - - - -## Pitch - - - -## Alternatives - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/questions-help-support.md b/.github/ISSUE_TEMPLATE/questions-help-support.md deleted file mode 100644 index 77bfb55b9a..0000000000 --- a/.github/ISSUE_TEMPLATE/questions-help-support.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: "โ“Questions/Help/Support" -about: Do you need support? We have resources. - ---- - -## โ“ Questions and Help - -### Please note that this issue tracker is not a help form and this issue will be closed. - -We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum: - -- [Discussion Forum](https://discuss.pytorch.org/) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 41a434acb2..0000000000 --- a/.gitignore +++ /dev/null @@ -1,123 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# temp files -~* -*.swp - -# C extensions / folders -*.so -_ext/ - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg - -# 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/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ -docs/src/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints/ - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# dotenv -.env - -# virtualenv -.venv -venv/ -ENV/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# PyCharm project settings -.idea - -# OSX dir files -.DS_Store - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -# Generated Files -test/assets/sinewave.wav -torchaudio/version.py -gen.yml - -# Examples -examples/interactive_asr/data/*.txt -examples/interactive_asr/data/*.model -examples/interactive_asr/data/*.pt diff --git a/.python3 b/.python3 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1fd00c3e96..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -# note dist: 'trusty' does not work here -dist: xenial - -language: python - -# cache miniconda installer and similar files -cache: - directories: - - /home/travis/download - -# This matrix tests that the code works on Python 3.5, 3.6, 3.7, passes -# lint and example tests. -matrix: - fast_finish: true - include: - - env: PYTHON_VERSION="3.5" - - env: PYTHON_VERSION="3.6" - - env: PYTHON_VERSION="3.7" - - env: PYTHON_VERSION="3.5" RUN_FLAKE8="true" SKIP_INSTALL="true" SKIP_TESTS="true" - - env: PYTHON_VERSION="3.5" RUN_EXAMPLE_TESTS="true" SKIP_TESTS="true" - allow_failures: - - env: PYTHON_VERSION="3.5" RUN_EXAMPLE_TESTS="true" SKIP_TESTS="true" - -addons: - apt: - packages: - sox - libsox-dev - libsox-fmt-all - portaudio19-dev - -notifications: - email: false - -install: source build_tools/travis/install.sh -script: bash build_tools/travis/test_script.sh