diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index dfff799..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,28 +0,0 @@ -# Purpose - - -## Does this introduce a breaking change? - - -* [ ] Yes -* [ ] No - -## Author pre-publish checklist - - -* [ ] No PII in logs or output -* [ ] Made corresponding changes to the documentation -* [ ] All new packages used are included in requirements.txt -* [ ] Functions use type hints, and there are no type hint errors - -## Pull Request Type - -What kind of change does this Pull Request introduce? - - -* [ ] Bugfix -* [ ] Feature -* [ ] Code style update (formatting, local variables) -* [ ] Refactoring (no functional changes, no api changes) -* [ ] Documentation content changes -* [ ] Experiment notebook diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 74a9263..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Github Actions Workflow for CI - -name: CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install requirements - run: | - python -m venv env - source env/bin/activate - python -m pip install --upgrade pip - pip install -r .github/workflows/requirements.txt - - - name: Run flake8 tests - run: | - source env/bin/activate - flake8 --max-line-length 88 --exclude env,notebooks - - - name: Run bandit tests - run: | - source env/bin/activate - bandit -r --configfile bandit.yml src notebooks - - - name: Run pytest in docker containers - run: ./ci-tests.sh - env: - BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }} - - - name: Publish Test Results - uses: dorny/test-reporter@v1 - if: always() - with: - name: pytest - path: | - **/test-results-*.xml - reporter: java-junit - - - name: Publish Code Coverage Summary Report - uses: irongut/CodeCoverageSummary@v1.3.0 - with: - badge: true - output: both - format: markdown - filename: coverage.xml - - - name: Add code coverage summary markdown to github step summary - run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY - - - name: Archive test and code coverage results - uses: actions/upload-artifact@v3 - with: - name: test-and-coverage-results - path: | - **/test-reuslts-*.xml - coverage.xml diff --git a/.github/workflows/requirements.txt b/.github/workflows/requirements.txt deleted file mode 100644 index e86662a..0000000 --- a/.github/workflows/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -# Ensure these req versions are in sync together with the following so that code quality checks are consistent: -# - src/common/requirements.txt -# - notebooks/.devcontainer/requirements.txt -# - .azuredevops/requirements.txt -# - .github/workflows/requirements.txt -bandit==1.7.5 -black==23.1.0 -flake8==6.0.0 -isort==5.12.0 -pre-commit==3.2.1 -pytest==7.2.2 -pytest-cov==4.0.0 \ No newline at end of file diff --git a/src/__init__.py b/Source/__init__.py similarity index 100% rename from src/__init__.py rename to Source/__init__.py diff --git a/src/common/__init__.py b/Source/common/__init__.py similarity index 100% rename from src/common/__init__.py rename to Source/common/__init__.py diff --git a/src/common/requirements.txt b/Source/common/requirements.txt similarity index 96% rename from src/common/requirements.txt rename to Source/common/requirements.txt index 9fa726f..e867e4a 100644 --- a/src/common/requirements.txt +++ b/Source/common/requirements.txt @@ -4,7 +4,7 @@ # - .azuredevops/requirements.txt # - .github/workflows/requirements.txt bandit==1.7.5 -black==23.1.0 +black==24.3.0 flake8==6.0.0 isort==5.12.0 mypy==1.1.1 diff --git a/src/sample_cpu_project/sample_main.py b/Source/sample_cpu_project/sample_main.py similarity index 100% rename from src/sample_cpu_project/sample_main.py rename to Source/sample_cpu_project/sample_main.py diff --git a/src/sample_cpu_project/tests/.gitkeep b/Source/sample_cpu_project/tests/.gitkeep similarity index 100% rename from src/sample_cpu_project/tests/.gitkeep rename to Source/sample_cpu_project/tests/.gitkeep diff --git a/src/sample_cpu_project/tests/test_dummy.py b/Source/sample_cpu_project/tests/test_dummy.py similarity index 100% rename from src/sample_cpu_project/tests/test_dummy.py rename to Source/sample_cpu_project/tests/test_dummy.py diff --git a/src/sample_pytorch_gpu_project/.amlignore b/Source/sample_pytorch_gpu_project/.amlignore similarity index 100% rename from src/sample_pytorch_gpu_project/.amlignore rename to Source/sample_pytorch_gpu_project/.amlignore diff --git a/src/sample_pytorch_gpu_project/.gitignore b/Source/sample_pytorch_gpu_project/.gitignore similarity index 100% rename from src/sample_pytorch_gpu_project/.gitignore rename to Source/sample_pytorch_gpu_project/.gitignore diff --git a/src/sample_pytorch_gpu_project/README.md b/Source/sample_pytorch_gpu_project/README.md similarity index 100% rename from src/sample_pytorch_gpu_project/README.md rename to Source/sample_pytorch_gpu_project/README.md diff --git a/src/sample_pytorch_gpu_project/aml_example/aml_components/inference-component.yaml b/Source/sample_pytorch_gpu_project/aml_example/aml_components/inference-component.yaml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/aml_components/inference-component.yaml rename to Source/sample_pytorch_gpu_project/aml_example/aml_components/inference-component.yaml diff --git a/src/sample_pytorch_gpu_project/aml_example/aml_components/train-component.yaml b/Source/sample_pytorch_gpu_project/aml_example/aml_components/train-component.yaml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/aml_components/train-component.yaml rename to Source/sample_pytorch_gpu_project/aml_example/aml_components/train-component.yaml diff --git a/src/sample_pytorch_gpu_project/aml_example/aml_setup/create-cpu-compute.yaml b/Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-cpu-compute.yaml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/aml_setup/create-cpu-compute.yaml rename to Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-cpu-compute.yaml diff --git a/src/sample_pytorch_gpu_project/aml_example/aml_setup/create-env.yaml b/Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-env.yaml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/aml_setup/create-env.yaml rename to Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-env.yaml diff --git a/src/sample_pytorch_gpu_project/aml_example/aml_setup/create-gpu-compute.yaml b/Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-gpu-compute.yaml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/aml_setup/create-gpu-compute.yaml rename to Source/sample_pytorch_gpu_project/aml_example/aml_setup/create-gpu-compute.yaml diff --git a/src/sample_pytorch_gpu_project/aml_example/sample-aml-components-pipeline.yml b/Source/sample_pytorch_gpu_project/aml_example/sample-aml-components-pipeline.yml similarity index 100% rename from src/sample_pytorch_gpu_project/aml_example/sample-aml-components-pipeline.yml rename to Source/sample_pytorch_gpu_project/aml_example/sample-aml-components-pipeline.yml diff --git a/src/sample_pytorch_gpu_project/inference.py b/Source/sample_pytorch_gpu_project/inference.py similarity index 100% rename from src/sample_pytorch_gpu_project/inference.py rename to Source/sample_pytorch_gpu_project/inference.py diff --git a/src/sample_pytorch_gpu_project/sample_main.py b/Source/sample_pytorch_gpu_project/sample_main.py similarity index 100% rename from src/sample_pytorch_gpu_project/sample_main.py rename to Source/sample_pytorch_gpu_project/sample_main.py diff --git a/src/sample_pytorch_gpu_project/tests/.gitkeep b/Source/sample_pytorch_gpu_project/tests/.gitkeep similarity index 100% rename from src/sample_pytorch_gpu_project/tests/.gitkeep rename to Source/sample_pytorch_gpu_project/tests/.gitkeep diff --git a/src/sample_pytorch_gpu_project/tests/test_dummy.py b/Source/sample_pytorch_gpu_project/tests/test_dummy.py similarity index 100% rename from src/sample_pytorch_gpu_project/tests/test_dummy.py rename to Source/sample_pytorch_gpu_project/tests/test_dummy.py diff --git a/src/sample_pytorch_gpu_project/train.py b/Source/sample_pytorch_gpu_project/train.py similarity index 100% rename from src/sample_pytorch_gpu_project/train.py rename to Source/sample_pytorch_gpu_project/train.py diff --git a/notebooks/.devcontainer/Dockerfile b/notebooks/.devcontainer/Dockerfile deleted file mode 100644 index cc62cff..0000000 --- a/notebooks/.devcontainer/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM python:3.9.16 -# create non-root user and set the default user -ARG USERNAME=devuser -ARG USER_UID=1000 -ARG USER_GID=$USER_UID -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - # Add sudo support - && apt-get update \ - && apt-get install -y sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME \ - && rm -rf /var/lib/apt/lists/* -USER $USERNAME - -# make all python tools installed by pip accesible -ENV PATH=$PATH:/home/$USERNAME/.local/bin -RUN pip install pip --upgrade -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt diff --git a/notebooks/.devcontainer/devcontainer.json b/notebooks/.devcontainer/devcontainer.json deleted file mode 100644 index 07566ac..0000000 --- a/notebooks/.devcontainer/devcontainer.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "notebooks", - "dockerComposeFile": [ - "docker-compose.yml" - ], - "workspaceFolder": "/workspace/notebooks", - "service": "notebooks", - "shutdownAction": "none", - "postAttachCommand": "bash", - "settings": { - "terminal.integrated.defaultProfile.linux": "bash", - "autoDocstring.docstringFormat": "google", - "python.formatting.provider": "black", - "python.linting.banditEnabled": true, - "python.linting.banditArgs": [ - "-r", - "--configfile=${workspaceFolder}/../bandit.yml" - ], - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": [ - "--max-line-length=88" - ], - "python.linting.mypyEnabled": true, - "python.testing.pytestEnabled": true, - "python.pythonPath": "python", - "[python]": { - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "files.trimTrailingWhitespace": true - }, - "isort.args": [ - "--profile", - "black" - ], - }, - "extensions": [ - "codezombiech.gitignore", - "DavidAnson.vscode-markdownlint", - "donjayamanne.githistory", - "donjayamanne.python-environment-manager", - "eamodio.gitlens", - "GitHub.copilot", - "Gruntfuggly.todo-tree", - "ionutvmi.path-autocomplete", - "marchiore.csvtomarkdown", - "mechatroner.rainbow-csv", - "ms-azure-devops.azure-pipelines", - "ms-python.python", - "ms-python.isort", - "ms-toolsai.jupyter", - "ms-vsliveshare.vsliveshare", - "njpwerner.autodocstring", - "redhat.vscode-yaml", - "streetsidesoftware.code-spell-checker", - "timonwong.shellcheck", - ] - -} diff --git a/notebooks/.devcontainer/docker-compose.yml b/notebooks/.devcontainer/docker-compose.yml deleted file mode 100644 index 7312de9..0000000 --- a/notebooks/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3' -services: - notebooks: - env_file: ../../.env - build: - context: . - dockerfile: Dockerfile - volumes: - # Mount the root folder that contains .git - - ../..:/workspace:cached - command: /bin/sh -c "while sleep 1000; do :; done" diff --git a/notebooks/.devcontainer/requirements.txt b/notebooks/.devcontainer/requirements.txt deleted file mode 100644 index 6b8cb80..0000000 --- a/notebooks/.devcontainer/requirements.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Ensure these req versions are in sync together with the following so that code quality checks are consistent: -# - src/common/requirements.txt -# - notebooks/.devcontainer/requirements.txt -# - .azuredevops/requirements.txt -# - .github/workflows/requirements.txt -bandit==1.7.5 -black==23.1.0 -flake8==6.0.0 -isort==5.12.0 -mypy==1.1.1 -pytest==7.2.2 -pre-commit==3.2.1 - -# notebooks specific requirements -ipykernel==6.22.0 -nbconvert==7.2.10 -nbformat==5.8.0 diff --git a/src/.amlignore b/src/.amlignore deleted file mode 100644 index 052da9d..0000000 --- a/src/.amlignore +++ /dev/null @@ -1,15 +0,0 @@ -**/outputs -**/data -**/logs -**/tests -**/__pycache__ -**/.mypy_cache -**/.pytest_cache -**/.vscode -**/junit -**/.azuredevops -**/.venv -**/venv -**/*.md -**/train_artifacts -**/mlruns \ No newline at end of file diff --git a/src/.dockerignore b/src/.dockerignore deleted file mode 100644 index 052da9d..0000000 --- a/src/.dockerignore +++ /dev/null @@ -1,15 +0,0 @@ -**/outputs -**/data -**/logs -**/tests -**/__pycache__ -**/.mypy_cache -**/.pytest_cache -**/.vscode -**/junit -**/.azuredevops -**/.venv -**/venv -**/*.md -**/train_artifacts -**/mlruns \ No newline at end of file diff --git a/src/sample_cpu_project/.devcontainer/Dockerfile b/src/sample_cpu_project/.devcontainer/Dockerfile deleted file mode 100644 index d8d1659..0000000 --- a/src/sample_cpu_project/.devcontainer/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.9.16 -# create non-root user and set the default user -ARG USERNAME=devuser -ARG USER_UID=1000 -ARG USER_GID=$USER_UID -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - # Add sudo support - && apt-get update \ - && apt-get install -y sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME \ - && rm -rf /var/lib/apt/lists/* -USER $USERNAME - -# make all python tools installed by pip accesible -ENV PATH=$PATH:/home/devuser/.local/bin -RUN pip install pip --upgrade -COPY sample_cpu_project/.devcontainer/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -# install python tools -COPY common/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - - diff --git a/src/sample_cpu_project/.devcontainer/devcontainer.json b/src/sample_cpu_project/.devcontainer/devcontainer.json deleted file mode 100644 index c2756b3..0000000 --- a/src/sample_cpu_project/.devcontainer/devcontainer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "sample_cpu_project", - "dockerComposeFile": [ - "docker-compose.yml" - ], - "workspaceFolder": "/workspace/src/sample_cpu_project", - "service": "sample_cpu_project", - "shutdownAction": "none", - "postAttachCommand": "bash", - "settings": { - "terminal.integrated.defaultProfile.linux": "bash", - "autoDocstring.docstringFormat": "google", - "python.formatting.provider": "black", - "python.linting.banditEnabled": true, - "python.linting.banditArgs": [ - "-r", - "--configfile=${workspaceFolder}/../../bandit.yml" - ], - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": [ - "--max-line-length=88" - ], - "python.linting.mypyEnabled": true, - "python.testing.pytestEnabled": true, - "python.pythonPath": "python", - "[python]": { - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "files.trimTrailingWhitespace": true - }, - "isort.args": [ - "--profile", - "black" - ], - }, - "extensions": [ - "codezombiech.gitignore", - "DavidAnson.vscode-markdownlint", - "donjayamanne.githistory", - "donjayamanne.python-environment-manager", - "eamodio.gitlens", - "GitHub.copilot", - "Gruntfuggly.todo-tree", - "ionutvmi.path-autocomplete", - "marchiore.csvtomarkdown", - "mechatroner.rainbow-csv", - "ms-azure-devops.azure-pipelines", - "ms-python.python", - "ms-python.isort", - "ms-toolsai.jupyter", - "ms-vsliveshare.vsliveshare", - "njpwerner.autodocstring", - "redhat.vscode-yaml", - "streetsidesoftware.code-spell-checker", - "timonwong.shellcheck", - ] -} diff --git a/src/sample_cpu_project/.devcontainer/docker-compose.yml b/src/sample_cpu_project/.devcontainer/docker-compose.yml deleted file mode 100644 index 05a38ea..0000000 --- a/src/sample_cpu_project/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: "3" -services: - sample_cpu_project: - env_file: ../../../.env - build: - context: ../../ - dockerfile: sample_cpu_project/.devcontainer/Dockerfile - volumes: - # Mount the root folder that contains .git - - ../../..:/workspace:cached - command: /bin/sh -c "while sleep 1000; do :; done" diff --git a/src/sample_cpu_project/.devcontainer/requirements.txt b/src/sample_cpu_project/.devcontainer/requirements.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/sample_pytorch_gpu_project/.devcontainer/Dockerfile b/src/sample_pytorch_gpu_project/.devcontainer/Dockerfile deleted file mode 100644 index 996b2dc..0000000 --- a/src/sample_pytorch_gpu_project/.devcontainer/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# leverage multi-stage build and copy python binaries to cuda container -FROM python:3.9.16 as python -FROM nvidia/cuda:12.0.1-cudnn8-runtime-ubuntu20.04 -COPY --from=python /usr/local/ /usr/local/ - -RUN apt-get update \ - && apt-get install -y \ - wget \ - git \ - sudo \ - && rm -rf /var/lib/apt/lists/* - -# install Azure CLI -RUN wget -qO- https://aka.ms/InstallAzureCLIDeb | bash - -# create non-root user and set the default user -ARG USERNAME=devuser -ARG USER_UID=1000 -ARG USER_GID=$USER_UID -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME -USER $USERNAME - -# make all python tools installed by pip accesible -ENV PATH=$PATH:/home/$USERNAME/.local/bin -RUN pip install pip --upgrade -COPY sample_pytorch_gpu_project/.devcontainer/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -# install python tools -COPY common/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -RUN az extension add --name ml diff --git a/src/sample_pytorch_gpu_project/.devcontainer/devcontainer.json b/src/sample_pytorch_gpu_project/.devcontainer/devcontainer.json deleted file mode 100644 index 7e3c0b2..0000000 --- a/src/sample_pytorch_gpu_project/.devcontainer/devcontainer.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "sample_pytorch_gpu_project", - "dockerComposeFile": [ - "docker-compose.yml" - ], - "workspaceFolder": "/workspace/src/sample_pytorch_gpu_project", - "service": "sample_pytorch_gpu_project", - "shutdownAction": "none", - "postAttachCommand": "bash", - "runArgs": [ - "--gpus", - "all" - ], - "settings": { - "terminal.integrated.defaultProfile.linux": "bash", - "autoDocstring.docstringFormat": "google", - "python.formatting.provider": "black", - "python.linting.banditEnabled": true, - "python.linting.banditArgs": [ - "-r", - "--configfile=${workspaceFolder}/../../bandit.yml" - ], - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": [ - "--max-line-length=88" - ], - "python.linting.mypyEnabled": true, - "python.testing.pytestEnabled": true, - "python.pythonPath": "python", - "[python]": { - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "files.trimTrailingWhitespace": true - }, - "isort.args": [ - "--profile", - "black" - ], - }, - "extensions": [ - "codezombiech.gitignore", - "DavidAnson.vscode-markdownlint", - "donjayamanne.githistory", - "donjayamanne.python-environment-manager", - "eamodio.gitlens", - "GitHub.copilot", - "Gruntfuggly.todo-tree", - "ionutvmi.path-autocomplete", - "marchiore.csvtomarkdown", - "mechatroner.rainbow-csv", - "ms-azure-devops.azure-pipelines", - "ms-python.python", - "ms-python.isort", - "ms-toolsai.jupyter", - "ms-vsliveshare.vsliveshare", - "njpwerner.autodocstring", - "redhat.vscode-yaml", - "streetsidesoftware.code-spell-checker", - "timonwong.shellcheck", - ] -} diff --git a/src/sample_pytorch_gpu_project/.devcontainer/docker-compose.yml b/src/sample_pytorch_gpu_project/.devcontainer/docker-compose.yml deleted file mode 100644 index fa86d23..0000000 --- a/src/sample_pytorch_gpu_project/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3' -services: - sample_pytorch_gpu_project: - env_file: ../../../.env - build: - context: ../../ - dockerfile: sample_pytorch_gpu_project/.devcontainer/Dockerfile - volumes: - # Mount the root folder that contains .git - - ../../..:/workspace:cached - command: /bin/sh -c "while sleep 1000; do :; done" diff --git a/src/sample_pytorch_gpu_project/.devcontainer/requirements.txt b/src/sample_pytorch_gpu_project/.devcontainer/requirements.txt deleted file mode 100644 index 871de58..0000000 --- a/src/sample_pytorch_gpu_project/.devcontainer/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -torch==2.0.0 -torchvision==0.15.1 -# use this below if you want to use torch 1.13.1 instead. -# you need --extra-index-url flag as stated in https://pytorch.org/get-started/previous-versions/#linux-and-windows-1 -# torch==1.13.1+cu117 -# torchvision==0.14.1+cu117 -# --extra-index-url https://download.pytorch.org/whl/cu117 - -# the below are used by AML, can be deleted if not using AML -mlflow==2.3.1 -azureml-mlflow==1.50.0 \ No newline at end of file