From 53190efea6f251f9e4e2c4506147be9a41f4a593 Mon Sep 17 00:00:00 2001 From: zeryx <1892175+zeryx@users.noreply.github.com> Date: Tue, 30 May 2023 11:01:14 -0400 Subject: [PATCH 1/5] initial migration away from cookiecutter / docker images Signed-off-by: zeryx <1892175+zeryx@users.noreply.github.com> --- .../LICENSE | 0 .../README.md | 0 .../bayesian_optimization_example.py | 0 .../requirements.txt | 0 .../{{cookiecutter.project_name}}/.gitignore | 138 ------------------ .../{{cookiecutter.project_name}}/Dockerfile | 26 ---- .../docker_build.sh | 46 ------ .../workflows/__init__.py | 1 - .../LICENSE | 0 .../README.md | 0 .../workflows => }/mnist_training_example.py | 0 .../requirements.txt | 0 .../{{cookiecutter.project_name}}/.gitignore | 138 ------------------ .../{{cookiecutter.project_name}}/Dockerfile | 28 ---- .../docker_build.sh | 46 ------ .../workflows/__init__.py | 2 - .../LICENSE | 0 .../README.md | 0 .../workflows => }/example.py | 0 .../requirements.txt | 0 .../{{cookiecutter.project_name}}/.gitignore | 138 ------------------ .../{{cookiecutter.project_name}}/Dockerfile | 26 ---- .../docker_build.sh | 46 ------ .../workflows/__init__.py | 1 - .../LICENSE | 0 .../README.md | 0 .../requirements.txt | 0 .../wine_classification_example.py | 0 .../{{cookiecutter.project_name}}/.gitignore | 138 ------------------ .../{{cookiecutter.project_name}}/Dockerfile | 26 ---- .../workflows/__init__.py | 1 - 31 files changed, 801 deletions(-) rename bayesian-optimization/{{{cookiecutter.project_name}} => }/LICENSE (100%) rename bayesian-optimization/{{{cookiecutter.project_name}} => }/README.md (100%) rename bayesian-optimization/{{{cookiecutter.project_name}}/workflows => }/bayesian_optimization_example.py (100%) rename bayesian-optimization/{{{cookiecutter.project_name}} => }/requirements.txt (100%) delete mode 100644 bayesian-optimization/{{cookiecutter.project_name}}/.gitignore delete mode 100644 bayesian-optimization/{{cookiecutter.project_name}}/Dockerfile delete mode 100755 bayesian-optimization/{{cookiecutter.project_name}}/docker_build.sh delete mode 100644 bayesian-optimization/{{cookiecutter.project_name}}/workflows/__init__.py rename mnist-training/{{{cookiecutter.project_name}} => }/LICENSE (100%) rename mnist-training/{{{cookiecutter.project_name}} => }/README.md (100%) rename mnist-training/{{{cookiecutter.project_name}}/workflows => }/mnist_training_example.py (100%) rename mnist-training/{{{cookiecutter.project_name}} => }/requirements.txt (100%) delete mode 100644 mnist-training/{{cookiecutter.project_name}}/.gitignore delete mode 100644 mnist-training/{{cookiecutter.project_name}}/Dockerfile delete mode 100644 mnist-training/{{cookiecutter.project_name}}/docker_build.sh delete mode 100644 mnist-training/{{cookiecutter.project_name}}/workflows/__init__.py rename simple-example/{{{cookiecutter.project_name}} => }/LICENSE (100%) rename simple-example/{{{cookiecutter.project_name}} => }/README.md (100%) rename simple-example/{{{cookiecutter.project_name}}/workflows => }/example.py (100%) rename simple-example/{{{cookiecutter.project_name}} => }/requirements.txt (100%) delete mode 100644 simple-example/{{cookiecutter.project_name}}/.gitignore delete mode 100644 simple-example/{{cookiecutter.project_name}}/Dockerfile delete mode 100755 simple-example/{{cookiecutter.project_name}}/docker_build.sh delete mode 100644 simple-example/{{cookiecutter.project_name}}/workflows/__init__.py rename wine-classification/{{{cookiecutter.project_name}} => }/LICENSE (100%) rename wine-classification/{{{cookiecutter.project_name}} => }/README.md (100%) rename wine-classification/{{{cookiecutter.project_name}} => }/requirements.txt (100%) rename wine-classification/{{{cookiecutter.project_name}}/workflows => }/wine_classification_example.py (100%) delete mode 100644 wine-classification/{{cookiecutter.project_name}}/.gitignore delete mode 100644 wine-classification/{{cookiecutter.project_name}}/Dockerfile delete mode 100644 wine-classification/{{cookiecutter.project_name}}/workflows/__init__.py diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/LICENSE b/bayesian-optimization/LICENSE similarity index 100% rename from bayesian-optimization/{{cookiecutter.project_name}}/LICENSE rename to bayesian-optimization/LICENSE diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/README.md b/bayesian-optimization/README.md similarity index 100% rename from bayesian-optimization/{{cookiecutter.project_name}}/README.md rename to bayesian-optimization/README.md diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/workflows/bayesian_optimization_example.py b/bayesian-optimization/bayesian_optimization_example.py similarity index 100% rename from bayesian-optimization/{{cookiecutter.project_name}}/workflows/bayesian_optimization_example.py rename to bayesian-optimization/bayesian_optimization_example.py diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/requirements.txt b/bayesian-optimization/requirements.txt similarity index 100% rename from bayesian-optimization/{{cookiecutter.project_name}}/requirements.txt rename to bayesian-optimization/requirements.txt diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/.gitignore b/bayesian-optimization/{{cookiecutter.project_name}}/.gitignore deleted file mode 100644 index 77d9962..0000000 --- a/bayesian-optimization/{{cookiecutter.project_name}}/.gitignore +++ /dev/null @@ -1,138 +0,0 @@ -# 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 - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# 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 - -# 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/ - -# IDE -.idea/* - -# Flyte serialization artifacts -_pb_output -_pb_output/* - -flyte-package.tgz diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/Dockerfile b/bayesian-optimization/{{cookiecutter.project_name}}/Dockerfile deleted file mode 100644 index 71425fb..0000000 --- a/bayesian-optimization/{{cookiecutter.project_name}}/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.8-slim-buster - -WORKDIR /root -ENV VENV /opt/venv -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENV PYTHONPATH /root - -RUN apt-get update && apt-get install -y build-essential - -ENV VENV /opt/venv -# Virtual environment -RUN python3 -m venv ${VENV} -ENV PATH="${VENV}/bin:$PATH" - -# Install Python dependencies -COPY requirements.txt /root -RUN pip install -r /root/requirements.txt - -# Copy the actual code -COPY . /root - -# This tag is supplied by the build script and will be used to determine the version -# when registering tasks, workflows, and launch plans -ARG tag -ENV FLYTE_INTERNAL_IMAGE $tag diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/docker_build.sh b/bayesian-optimization/{{cookiecutter.project_name}}/docker_build.sh deleted file mode 100755 index 83f9069..0000000 --- a/bayesian-optimization/{{cookiecutter.project_name}}/docker_build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - -# SET the REGISTRY here, where the docker container should be pushed -REGISTRY="" - -# SET the appname here -PROJECT_NAME="{{ cookiecutter.project_name }}" - -while getopts a:r:v:h flag -do - case "${flag}" in - p) PROJECT_NAME=${OPTARG};; - r) REGISTRY=${OPTARG};; - v) VERSION=${OPTARG};; - h) echo "Usage: ${0} [-h|[-p ][-r ][-v ]]" - echo " h: help (this message)" - echo " p: PROJECT_NAME for your workflows. Defaults to '{{ cookiecutter.project_name }}'." - echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost" - echo " v: VERSION of the build. Defaults to using the current git head SHA" - exit 1;; - *) echo "Usage: ${0} [-h|[-a ][-r ][-v ]]" - exit 1;; - esac -done - -# If you are using git, then this will automatically use the git head as the -# version -if [ -z "${VERSION}" ]; then - echo "No version set, using git commit head sha as the version" - VERSION=$(git rev-parse HEAD) -fi - -TAG=${PROJECT_NAME}:${VERSION} -if [ -z "${REGISTRY}" ]; then - echo "No registry set, creating tag ${TAG}" -else - TAG="${REGISTRY}/${TAG}" - echo "Registry set: creating tag ${TAG}" -fi - -# Should be run in the folder that has Dockerfile -docker build --tag ${TAG} . - -echo "Docker image built with tag ${TAG}. You can use this image to run pyflyte package." diff --git a/bayesian-optimization/{{cookiecutter.project_name}}/workflows/__init__.py b/bayesian-optimization/{{cookiecutter.project_name}}/workflows/__init__.py deleted file mode 100644 index 5313296..0000000 --- a/bayesian-optimization/{{cookiecutter.project_name}}/workflows/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .bayesian_optimization_example import wf as wf \ No newline at end of file diff --git a/mnist-training/{{cookiecutter.project_name}}/LICENSE b/mnist-training/LICENSE similarity index 100% rename from mnist-training/{{cookiecutter.project_name}}/LICENSE rename to mnist-training/LICENSE diff --git a/mnist-training/{{cookiecutter.project_name}}/README.md b/mnist-training/README.md similarity index 100% rename from mnist-training/{{cookiecutter.project_name}}/README.md rename to mnist-training/README.md diff --git a/mnist-training/{{cookiecutter.project_name}}/workflows/mnist_training_example.py b/mnist-training/mnist_training_example.py similarity index 100% rename from mnist-training/{{cookiecutter.project_name}}/workflows/mnist_training_example.py rename to mnist-training/mnist_training_example.py diff --git a/mnist-training/{{cookiecutter.project_name}}/requirements.txt b/mnist-training/requirements.txt similarity index 100% rename from mnist-training/{{cookiecutter.project_name}}/requirements.txt rename to mnist-training/requirements.txt diff --git a/mnist-training/{{cookiecutter.project_name}}/.gitignore b/mnist-training/{{cookiecutter.project_name}}/.gitignore deleted file mode 100644 index 77d9962..0000000 --- a/mnist-training/{{cookiecutter.project_name}}/.gitignore +++ /dev/null @@ -1,138 +0,0 @@ -# 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 - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# 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 - -# 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/ - -# IDE -.idea/* - -# Flyte serialization artifacts -_pb_output -_pb_output/* - -flyte-package.tgz diff --git a/mnist-training/{{cookiecutter.project_name}}/Dockerfile b/mnist-training/{{cookiecutter.project_name}}/Dockerfile deleted file mode 100644 index 5b6f914..0000000 --- a/mnist-training/{{cookiecutter.project_name}}/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Ensure that your From Image is compatible with the version of pytorch you intend to use, -# and that the cuda version is compatible with the nvidia drivers located on the node. -FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime - -WORKDIR /root -ENV VENV /opt/venv -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENV PYTHONPATH /root - -RUN apt-get update && apt-get install -y build-essential - -ENV VENV /opt/venv -# Virtual environment -RUN python3 -m venv ${VENV} -ENV PATH="${VENV}/bin:$PATH" - -# Install Python dependencies -COPY requirements.txt /root -RUN pip install -r /root/requirements.txt - -# Copy the actual code -COPY . /root - -# This tag is supplied by the build script and will be used to determine the version -# when registering tasks, workflows, and launch plans -ARG tag -ENV FLYTE_INTERNAL_IMAGE $tag diff --git a/mnist-training/{{cookiecutter.project_name}}/docker_build.sh b/mnist-training/{{cookiecutter.project_name}}/docker_build.sh deleted file mode 100644 index 83f9069..0000000 --- a/mnist-training/{{cookiecutter.project_name}}/docker_build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - -# SET the REGISTRY here, where the docker container should be pushed -REGISTRY="" - -# SET the appname here -PROJECT_NAME="{{ cookiecutter.project_name }}" - -while getopts a:r:v:h flag -do - case "${flag}" in - p) PROJECT_NAME=${OPTARG};; - r) REGISTRY=${OPTARG};; - v) VERSION=${OPTARG};; - h) echo "Usage: ${0} [-h|[-p ][-r ][-v ]]" - echo " h: help (this message)" - echo " p: PROJECT_NAME for your workflows. Defaults to '{{ cookiecutter.project_name }}'." - echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost" - echo " v: VERSION of the build. Defaults to using the current git head SHA" - exit 1;; - *) echo "Usage: ${0} [-h|[-a ][-r ][-v ]]" - exit 1;; - esac -done - -# If you are using git, then this will automatically use the git head as the -# version -if [ -z "${VERSION}" ]; then - echo "No version set, using git commit head sha as the version" - VERSION=$(git rev-parse HEAD) -fi - -TAG=${PROJECT_NAME}:${VERSION} -if [ -z "${REGISTRY}" ]; then - echo "No registry set, creating tag ${TAG}" -else - TAG="${REGISTRY}/${TAG}" - echo "Registry set: creating tag ${TAG}" -fi - -# Should be run in the folder that has Dockerfile -docker build --tag ${TAG} . - -echo "Docker image built with tag ${TAG}. You can use this image to run pyflyte package." diff --git a/mnist-training/{{cookiecutter.project_name}}/workflows/__init__.py b/mnist-training/{{cookiecutter.project_name}}/workflows/__init__.py deleted file mode 100644 index e09d193..0000000 --- a/mnist-training/{{cookiecutter.project_name}}/workflows/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .mnist_training_example import mnist_workflow_cpu as mnist_workflow_cpu -from .mnist_training_example import mnist_workflow_gpu as mnist_workflow_gpu \ No newline at end of file diff --git a/simple-example/{{cookiecutter.project_name}}/LICENSE b/simple-example/LICENSE similarity index 100% rename from simple-example/{{cookiecutter.project_name}}/LICENSE rename to simple-example/LICENSE diff --git a/simple-example/{{cookiecutter.project_name}}/README.md b/simple-example/README.md similarity index 100% rename from simple-example/{{cookiecutter.project_name}}/README.md rename to simple-example/README.md diff --git a/simple-example/{{cookiecutter.project_name}}/workflows/example.py b/simple-example/example.py similarity index 100% rename from simple-example/{{cookiecutter.project_name}}/workflows/example.py rename to simple-example/example.py diff --git a/simple-example/{{cookiecutter.project_name}}/requirements.txt b/simple-example/requirements.txt similarity index 100% rename from simple-example/{{cookiecutter.project_name}}/requirements.txt rename to simple-example/requirements.txt diff --git a/simple-example/{{cookiecutter.project_name}}/.gitignore b/simple-example/{{cookiecutter.project_name}}/.gitignore deleted file mode 100644 index 77d9962..0000000 --- a/simple-example/{{cookiecutter.project_name}}/.gitignore +++ /dev/null @@ -1,138 +0,0 @@ -# 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 - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# 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 - -# 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/ - -# IDE -.idea/* - -# Flyte serialization artifacts -_pb_output -_pb_output/* - -flyte-package.tgz diff --git a/simple-example/{{cookiecutter.project_name}}/Dockerfile b/simple-example/{{cookiecutter.project_name}}/Dockerfile deleted file mode 100644 index 71425fb..0000000 --- a/simple-example/{{cookiecutter.project_name}}/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.8-slim-buster - -WORKDIR /root -ENV VENV /opt/venv -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENV PYTHONPATH /root - -RUN apt-get update && apt-get install -y build-essential - -ENV VENV /opt/venv -# Virtual environment -RUN python3 -m venv ${VENV} -ENV PATH="${VENV}/bin:$PATH" - -# Install Python dependencies -COPY requirements.txt /root -RUN pip install -r /root/requirements.txt - -# Copy the actual code -COPY . /root - -# This tag is supplied by the build script and will be used to determine the version -# when registering tasks, workflows, and launch plans -ARG tag -ENV FLYTE_INTERNAL_IMAGE $tag diff --git a/simple-example/{{cookiecutter.project_name}}/docker_build.sh b/simple-example/{{cookiecutter.project_name}}/docker_build.sh deleted file mode 100755 index 83f9069..0000000 --- a/simple-example/{{cookiecutter.project_name}}/docker_build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - -# SET the REGISTRY here, where the docker container should be pushed -REGISTRY="" - -# SET the appname here -PROJECT_NAME="{{ cookiecutter.project_name }}" - -while getopts a:r:v:h flag -do - case "${flag}" in - p) PROJECT_NAME=${OPTARG};; - r) REGISTRY=${OPTARG};; - v) VERSION=${OPTARG};; - h) echo "Usage: ${0} [-h|[-p ][-r ][-v ]]" - echo " h: help (this message)" - echo " p: PROJECT_NAME for your workflows. Defaults to '{{ cookiecutter.project_name }}'." - echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost" - echo " v: VERSION of the build. Defaults to using the current git head SHA" - exit 1;; - *) echo "Usage: ${0} [-h|[-a ][-r ][-v ]]" - exit 1;; - esac -done - -# If you are using git, then this will automatically use the git head as the -# version -if [ -z "${VERSION}" ]; then - echo "No version set, using git commit head sha as the version" - VERSION=$(git rev-parse HEAD) -fi - -TAG=${PROJECT_NAME}:${VERSION} -if [ -z "${REGISTRY}" ]; then - echo "No registry set, creating tag ${TAG}" -else - TAG="${REGISTRY}/${TAG}" - echo "Registry set: creating tag ${TAG}" -fi - -# Should be run in the folder that has Dockerfile -docker build --tag ${TAG} . - -echo "Docker image built with tag ${TAG}. You can use this image to run pyflyte package." diff --git a/simple-example/{{cookiecutter.project_name}}/workflows/__init__.py b/simple-example/{{cookiecutter.project_name}}/workflows/__init__.py deleted file mode 100644 index af0a508..0000000 --- a/simple-example/{{cookiecutter.project_name}}/workflows/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .example import wf as wf \ No newline at end of file diff --git a/wine-classification/{{cookiecutter.project_name}}/LICENSE b/wine-classification/LICENSE similarity index 100% rename from wine-classification/{{cookiecutter.project_name}}/LICENSE rename to wine-classification/LICENSE diff --git a/wine-classification/{{cookiecutter.project_name}}/README.md b/wine-classification/README.md similarity index 100% rename from wine-classification/{{cookiecutter.project_name}}/README.md rename to wine-classification/README.md diff --git a/wine-classification/{{cookiecutter.project_name}}/requirements.txt b/wine-classification/requirements.txt similarity index 100% rename from wine-classification/{{cookiecutter.project_name}}/requirements.txt rename to wine-classification/requirements.txt diff --git a/wine-classification/{{cookiecutter.project_name}}/workflows/wine_classification_example.py b/wine-classification/wine_classification_example.py similarity index 100% rename from wine-classification/{{cookiecutter.project_name}}/workflows/wine_classification_example.py rename to wine-classification/wine_classification_example.py diff --git a/wine-classification/{{cookiecutter.project_name}}/.gitignore b/wine-classification/{{cookiecutter.project_name}}/.gitignore deleted file mode 100644 index 77d9962..0000000 --- a/wine-classification/{{cookiecutter.project_name}}/.gitignore +++ /dev/null @@ -1,138 +0,0 @@ -# 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 - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# 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 - -# 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/ - -# IDE -.idea/* - -# Flyte serialization artifacts -_pb_output -_pb_output/* - -flyte-package.tgz diff --git a/wine-classification/{{cookiecutter.project_name}}/Dockerfile b/wine-classification/{{cookiecutter.project_name}}/Dockerfile deleted file mode 100644 index c848bb8..0000000 --- a/wine-classification/{{cookiecutter.project_name}}/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.10-slim-buster - -WORKDIR /root -ENV VENV /opt/venv -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENV PYTHONPATH /root - -RUN apt-get update && apt-get install -y build-essential - -ENV VENV /opt/venv -# Virtual environment -RUN python3 -m venv ${VENV} -ENV PATH="${VENV}/bin:$PATH" - -# Install Python dependencies -COPY requirements.txt /root -RUN pip install -r /root/requirements.txt - -# Copy the actual code -COPY . /root - -# This tag is supplied by the build script and will be used to determine the version -# when registering tasks, workflows, and launch plans -ARG tag -ENV FLYTE_INTERNAL_IMAGE $tag diff --git a/wine-classification/{{cookiecutter.project_name}}/workflows/__init__.py b/wine-classification/{{cookiecutter.project_name}}/workflows/__init__.py deleted file mode 100644 index 11fb8b8..0000000 --- a/wine-classification/{{cookiecutter.project_name}}/workflows/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .wine_classification_example import training_workflow as training_workflow From fabac620ed0af121ff8fa53f31de1e82b56415a6 Mon Sep 17 00:00:00 2001 From: zeryx <1892175+zeryx@users.noreply.github.com> Date: Tue, 30 May 2023 11:29:05 -0400 Subject: [PATCH 2/5] repackaged all templates to use imageSpec Signed-off-by: zeryx <1892175+zeryx@users.noreply.github.com> --- .../bayesian_optimization_example.py | 63 ++++++++++++++----- simple-example/example.py | 33 ++++++++-- .../wine_classification_example.py | 26 +++++++- 3 files changed, 100 insertions(+), 22 deletions(-) diff --git a/bayesian-optimization/bayesian_optimization_example.py b/bayesian-optimization/bayesian_optimization_example.py index 3ecce9b..06f9a78 100644 --- a/bayesian-optimization/bayesian_optimization_example.py +++ b/bayesian-optimization/bayesian_optimization_example.py @@ -1,23 +1,46 @@ from typing import Dict, List -from flytekit import task, workflow, dynamic +from flytekit import task, workflow, dynamic, ImageSpec from bayes_opt import BayesianOptimization, UtilityFunction +""" +Image Spec is a way to specify how to build a container image without a Dockerfile. The image spec by default will be +converted to an `Envd `__ config, and the `Envd builder +`__ will build the image for you. However, you can also register your own builder to build +the image using other tools. +For every :py:class:`flytekit.PythonFunctionTask` task or a task decorated with the ``@task`` decorator, +you can specify rules for binding container images. By default, flytekit binds a single container image, i.e., +the `default Docker image `__, to all tasks. To modify this behavior, +use the ``container_image`` parameter available in the :py:func:`flytekit.task` decorator, and pass an +``ImageSpec``. +Before building the image, Flytekit checks the container registry first to see if the image already exists. By doing +so, it avoids having to rebuild the image over and over again. If the image does not exist, flytekit will build the +image before registering the workflow, and replace the image name in the task template with the newly built image name. +""" +image_definition = ImageSpec( + image_name="flytekit", # rename this to your docker image name + base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", # this is the base image that flytekit will use to build your image + registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to + packages=["flytekit>=1.6.0", "bayesian-optimization==1.4.3"], # these are the packages that will be installed in your image + python_version="3.10", # this is the python version that will be used to build your image +) Point = Dict[str, float] -@task +@task(container_image=image_definition) def black_box_function(point: Point) -> float: # implement your function to optimize here! x, y = point["x"], point["y"] return -x ** 2 - (y - 1) ** 2 + 1 -@task + +@task(container_image=image_definition) def suggest_points( - optimizer: BayesianOptimization, - utility: UtilityFunction, - concurrency: int, + optimizer: BayesianOptimization, + utility: UtilityFunction, + concurrency: int, ) -> List[Point]: points = set() # make sure that points are unique @@ -25,33 +48,38 @@ def suggest_points( points.add(tuple([(k, float(v)) for k, v in optimizer.suggest(utility).items()])) return [dict(x) for x in points] -@task + +@task(container_image=image_definition) def register_targets( - optimizer: BayesianOptimization, - points: List[Point], - targets: List[float], + optimizer: BayesianOptimization, + points: List[Point], + targets: List[float], ) -> BayesianOptimization: for point, target in zip(points, targets): optimizer.register(params=point, target=target) return optimizer -@task + +@task(container_image=image_definition) def log_iteration( - optimizer: BayesianOptimization, - points: List[Point], - targets: List[float], + optimizer: BayesianOptimization, + points: List[Point], + targets: List[float], ): print(f"{points=}\n{targets=}\n{optimizer.max=}\n") -@task + +@task(container_image=image_definition) def return_max(optimizer: BayesianOptimization) -> Dict: return optimizer.max -@dynamic + +@dynamic(container_image=image_definition) def concurrent_trials(points: List[Point]) -> List[float]: return [black_box_function(point=point) for point in points] -@dynamic + +@dynamic(container_image=image_definition) def bayesopt(n_iter: int, concurrency: int) -> Dict: optimizer = BayesianOptimization( f=None, @@ -68,6 +96,7 @@ def bayesopt(n_iter: int, concurrency: int) -> Dict: # return point that maximized the target return return_max(optimizer=optimizer) + @workflow def wf(n_iter: int = 10, concurrency: int = 10) -> Dict: return bayesopt(n_iter=n_iter, concurrency=concurrency) diff --git a/simple-example/example.py b/simple-example/example.py index 1a01fb6..5e92947 100644 --- a/simple-example/example.py +++ b/simple-example/example.py @@ -1,10 +1,34 @@ """A simple Flyte example.""" import typing -from flytekit import task, workflow +from flytekit import task, workflow, ImageSpec +""" +Image Spec is a way to specify how to build a container image without a Dockerfile. The image spec by default will be +converted to an `Envd `__ config, and the `Envd builder +`__ will build the image for you. However, you can also register your own builder to build +the image using other tools. +For every :py:class:`flytekit.PythonFunctionTask` task or a task decorated with the ``@task`` decorator, +you can specify rules for binding container images. By default, flytekit binds a single container image, i.e., +the `default Docker image `__, to all tasks. To modify this behavior, +use the ``container_image`` parameter available in the :py:func:`flytekit.task` decorator, and pass an +``ImageSpec``. +Before building the image, Flytekit checks the container registry first to see if the image already exists. By doing +so, it avoids having to rebuild the image over and over again. If the image does not exist, flytekit will build the +image before registering the workflow, and replace the image name in the task template with the newly built image name. +""" +image_definition = ImageSpec( + image_name="flytekit", # rename this to your docker image name + base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", + # this is the base image that flytekit will use to build your image + registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to + packages=["flytekit>=1.6.0"], # these are the packages that will be installed in your image + python_version="3.10", # this is the python version that will be used to build your image +) -@task + +@task(container_image=image_definition) def say_hello(name: str) -> str: """A simple Flyte task to say "hello". @@ -14,11 +38,12 @@ def say_hello(name: str) -> str: return f"hello {name}!" -@task +@task(container_image=image_definition) def greeting_length(greeting: str) -> int: """A task the counts the length of a greeting.""" return len(greeting) + @workflow def wf(name: str = "union") -> typing.Tuple[str, int]: """Declare workflow called `wf`. @@ -42,4 +67,4 @@ def wf(name: str = "union") -> typing.Tuple[str, int]: if __name__ == "__main__": # Execute the workflow, simply by invoking it like a function and passing in # the necessary parameters - print(f"Running wf() { wf(name='passengers') }") + print(f"Running wf() {wf(name='passengers')}") diff --git a/wine-classification/wine_classification_example.py b/wine-classification/wine_classification_example.py index 607930e..85c21aa 100644 --- a/wine-classification/wine_classification_example.py +++ b/wine-classification/wine_classification_example.py @@ -2,7 +2,31 @@ from sklearn.datasets import load_wine from sklearn.linear_model import LogisticRegression -from flytekit import task, workflow +from flytekit import task, workflow, ImageSpec + +""" +Image Spec is a way to specify how to build a container image without a Dockerfile. The image spec by default will be +converted to an `Envd `__ config, and the `Envd builder +`__ will build the image for you. However, you can also register your own builder to build +the image using other tools. +For every :py:class:`flytekit.PythonFunctionTask` task or a task decorated with the ``@task`` decorator, +you can specify rules for binding container images. By default, flytekit binds a single container image, i.e., +the `default Docker image `__, to all tasks. To modify this behavior, +use the ``container_image`` parameter available in the :py:func:`flytekit.task` decorator, and pass an +``ImageSpec``. +Before building the image, Flytekit checks the container registry first to see if the image already exists. By doing +so, it avoids having to rebuild the image over and over again. If the image does not exist, flytekit will build the +image before registering the workflow, and replace the image name in the task template with the newly built image name. +""" +image_definition = ImageSpec( + image_name="flytekit", # rename this to your docker image name + base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", + # this is the base image that flytekit will use to build your image + registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to + packages=["flytekit>=1.6.0", "pandas==1.5.3", "scikit-learn==1.2.2"], # these are the packages that will be installed in your image + python_version="3.10", # this is the python version that will be used to build your image +) @task def get_data() -> pd.DataFrame: From f090dc74f8680ac7405288b7b6aa03345383c8db Mon Sep 17 00:00:00 2001 From: zeryx <1892175+zeryx@users.noreply.github.com> Date: Tue, 30 May 2023 11:46:33 -0400 Subject: [PATCH 3/5] incorrect imagespec image name Signed-off-by: zeryx <1892175+zeryx@users.noreply.github.com> --- bayesian-optimization/bayesian_optimization_example.py | 2 +- simple-example/example.py | 2 +- wine-classification/wine_classification_example.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bayesian-optimization/bayesian_optimization_example.py b/bayesian-optimization/bayesian_optimization_example.py index 06f9a78..e0c165a 100644 --- a/bayesian-optimization/bayesian_optimization_example.py +++ b/bayesian-optimization/bayesian_optimization_example.py @@ -19,7 +19,7 @@ image before registering the workflow, and replace the image name in the task template with the newly built image name. """ image_definition = ImageSpec( - image_name="flytekit", # rename this to your docker image name + name="flytekit", # rename this to your docker image name base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", # this is the base image that flytekit will use to build your image registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to packages=["flytekit>=1.6.0", "bayesian-optimization==1.4.3"], # these are the packages that will be installed in your image diff --git a/simple-example/example.py b/simple-example/example.py index 5e92947..46dd765 100644 --- a/simple-example/example.py +++ b/simple-example/example.py @@ -19,7 +19,7 @@ image before registering the workflow, and replace the image name in the task template with the newly built image name. """ image_definition = ImageSpec( - image_name="flytekit", # rename this to your docker image name + name="flytekit", # rename this to your docker image name base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", # this is the base image that flytekit will use to build your image registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to diff --git a/wine-classification/wine_classification_example.py b/wine-classification/wine_classification_example.py index 85c21aa..8ad04bb 100644 --- a/wine-classification/wine_classification_example.py +++ b/wine-classification/wine_classification_example.py @@ -20,7 +20,7 @@ image before registering the workflow, and replace the image name in the task template with the newly built image name. """ image_definition = ImageSpec( - image_name="flytekit", # rename this to your docker image name + name="flytekit", # rename this to your docker image name base_image="ghcr.io/flyteorg/flytekit:py3.10-1.6.0", # this is the base image that flytekit will use to build your image registry="ghcr.io/unionai-oss", # this is the registry where your image will be pushed to From 3524cf2d36afe231573c5ee4e6f55eec5021ae8f Mon Sep 17 00:00:00 2001 From: zeryx <1892175+zeryx@users.noreply.github.com> Date: Tue, 30 May 2023 13:04:57 -0400 Subject: [PATCH 4/5] moved to a duplicate directory structure (hopefully can continue to use cookiecutter Signed-off-by: zeryx <1892175+zeryx@users.noreply.github.com> --- bayesian-optimization/{ => bayesian_optimization}/LICENSE | 0 bayesian-optimization/{ => bayesian_optimization}/README.md | 0 .../{ => bayesian_optimization}/bayesian_optimization_example.py | 0 .../{ => bayesian_optimization}/requirements.txt | 0 mnist-training/{ => mnist_training}/LICENSE | 0 mnist-training/{ => mnist_training}/README.md | 0 mnist-training/{ => mnist_training}/mnist_training_example.py | 0 mnist-training/{ => mnist_training}/requirements.txt | 0 simple-example/{ => simple_example}/LICENSE | 0 simple-example/{ => simple_example}/README.md | 0 simple-example/{ => simple_example}/example.py | 0 simple-example/{ => simple_example}/requirements.txt | 0 wine-classification/{ => wine_classification}/LICENSE | 0 wine-classification/{ => wine_classification}/README.md | 0 wine-classification/{ => wine_classification}/requirements.txt | 0 .../{ => wine_classification}/wine_classification_example.py | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename bayesian-optimization/{ => bayesian_optimization}/LICENSE (100%) rename bayesian-optimization/{ => bayesian_optimization}/README.md (100%) rename bayesian-optimization/{ => bayesian_optimization}/bayesian_optimization_example.py (100%) rename bayesian-optimization/{ => bayesian_optimization}/requirements.txt (100%) rename mnist-training/{ => mnist_training}/LICENSE (100%) rename mnist-training/{ => mnist_training}/README.md (100%) rename mnist-training/{ => mnist_training}/mnist_training_example.py (100%) rename mnist-training/{ => mnist_training}/requirements.txt (100%) rename simple-example/{ => simple_example}/LICENSE (100%) rename simple-example/{ => simple_example}/README.md (100%) rename simple-example/{ => simple_example}/example.py (100%) rename simple-example/{ => simple_example}/requirements.txt (100%) rename wine-classification/{ => wine_classification}/LICENSE (100%) rename wine-classification/{ => wine_classification}/README.md (100%) rename wine-classification/{ => wine_classification}/requirements.txt (100%) rename wine-classification/{ => wine_classification}/wine_classification_example.py (100%) diff --git a/bayesian-optimization/LICENSE b/bayesian-optimization/bayesian_optimization/LICENSE similarity index 100% rename from bayesian-optimization/LICENSE rename to bayesian-optimization/bayesian_optimization/LICENSE diff --git a/bayesian-optimization/README.md b/bayesian-optimization/bayesian_optimization/README.md similarity index 100% rename from bayesian-optimization/README.md rename to bayesian-optimization/bayesian_optimization/README.md diff --git a/bayesian-optimization/bayesian_optimization_example.py b/bayesian-optimization/bayesian_optimization/bayesian_optimization_example.py similarity index 100% rename from bayesian-optimization/bayesian_optimization_example.py rename to bayesian-optimization/bayesian_optimization/bayesian_optimization_example.py diff --git a/bayesian-optimization/requirements.txt b/bayesian-optimization/bayesian_optimization/requirements.txt similarity index 100% rename from bayesian-optimization/requirements.txt rename to bayesian-optimization/bayesian_optimization/requirements.txt diff --git a/mnist-training/LICENSE b/mnist-training/mnist_training/LICENSE similarity index 100% rename from mnist-training/LICENSE rename to mnist-training/mnist_training/LICENSE diff --git a/mnist-training/README.md b/mnist-training/mnist_training/README.md similarity index 100% rename from mnist-training/README.md rename to mnist-training/mnist_training/README.md diff --git a/mnist-training/mnist_training_example.py b/mnist-training/mnist_training/mnist_training_example.py similarity index 100% rename from mnist-training/mnist_training_example.py rename to mnist-training/mnist_training/mnist_training_example.py diff --git a/mnist-training/requirements.txt b/mnist-training/mnist_training/requirements.txt similarity index 100% rename from mnist-training/requirements.txt rename to mnist-training/mnist_training/requirements.txt diff --git a/simple-example/LICENSE b/simple-example/simple_example/LICENSE similarity index 100% rename from simple-example/LICENSE rename to simple-example/simple_example/LICENSE diff --git a/simple-example/README.md b/simple-example/simple_example/README.md similarity index 100% rename from simple-example/README.md rename to simple-example/simple_example/README.md diff --git a/simple-example/example.py b/simple-example/simple_example/example.py similarity index 100% rename from simple-example/example.py rename to simple-example/simple_example/example.py diff --git a/simple-example/requirements.txt b/simple-example/simple_example/requirements.txt similarity index 100% rename from simple-example/requirements.txt rename to simple-example/simple_example/requirements.txt diff --git a/wine-classification/LICENSE b/wine-classification/wine_classification/LICENSE similarity index 100% rename from wine-classification/LICENSE rename to wine-classification/wine_classification/LICENSE diff --git a/wine-classification/README.md b/wine-classification/wine_classification/README.md similarity index 100% rename from wine-classification/README.md rename to wine-classification/wine_classification/README.md diff --git a/wine-classification/requirements.txt b/wine-classification/wine_classification/requirements.txt similarity index 100% rename from wine-classification/requirements.txt rename to wine-classification/wine_classification/requirements.txt diff --git a/wine-classification/wine_classification_example.py b/wine-classification/wine_classification/wine_classification_example.py similarity index 100% rename from wine-classification/wine_classification_example.py rename to wine-classification/wine_classification/wine_classification_example.py From 0856a0ee735a28f66790dc4b01b12ea76f549e1d Mon Sep 17 00:00:00 2001 From: zeryx <1892175+zeryx@users.noreply.github.com> Date: Tue, 30 May 2023 13:40:13 -0400 Subject: [PATCH 5/5] revert back to single directory structure, renamed workflow files to have the same name as their template name Signed-off-by: zeryx <1892175+zeryx@users.noreply.github.com> --- bayesian-optimization/{bayesian_optimization => }/LICENSE | 0 bayesian-optimization/{bayesian_optimization => }/README.md | 0 ...yesian_optimization_example.py => bayesian_optimization.py} | 0 bayesian-optimization/cookiecutter.json | 3 --- .../{bayesian_optimization => }/requirements.txt | 0 mnist-training/{mnist_training => }/LICENSE | 0 mnist-training/{mnist_training => }/README.md | 0 mnist-training/cookiecutter.json | 3 --- .../mnist_training_example.py => mnist_training.py} | 0 mnist-training/{mnist_training => }/requirements.txt | 0 simple-example/{simple_example => }/LICENSE | 0 simple-example/{simple_example => }/README.md | 0 simple-example/cookiecutter.json | 3 --- simple-example/{simple_example => }/example.py | 0 simple-example/{simple_example => }/requirements.txt | 0 wine-classification/{wine_classification => }/LICENSE | 0 wine-classification/{wine_classification => }/README.md | 0 wine-classification/cookiecutter.json | 3 --- wine-classification/{wine_classification => }/requirements.txt | 0 .../wine_classification_example.py => wine_classification.py} | 0 20 files changed, 12 deletions(-) rename bayesian-optimization/{bayesian_optimization => }/LICENSE (100%) rename bayesian-optimization/{bayesian_optimization => }/README.md (100%) rename bayesian-optimization/{bayesian_optimization/bayesian_optimization_example.py => bayesian_optimization.py} (100%) delete mode 100644 bayesian-optimization/cookiecutter.json rename bayesian-optimization/{bayesian_optimization => }/requirements.txt (100%) rename mnist-training/{mnist_training => }/LICENSE (100%) rename mnist-training/{mnist_training => }/README.md (100%) delete mode 100644 mnist-training/cookiecutter.json rename mnist-training/{mnist_training/mnist_training_example.py => mnist_training.py} (100%) rename mnist-training/{mnist_training => }/requirements.txt (100%) rename simple-example/{simple_example => }/LICENSE (100%) rename simple-example/{simple_example => }/README.md (100%) delete mode 100644 simple-example/cookiecutter.json rename simple-example/{simple_example => }/example.py (100%) rename simple-example/{simple_example => }/requirements.txt (100%) rename wine-classification/{wine_classification => }/LICENSE (100%) rename wine-classification/{wine_classification => }/README.md (100%) delete mode 100644 wine-classification/cookiecutter.json rename wine-classification/{wine_classification => }/requirements.txt (100%) rename wine-classification/{wine_classification/wine_classification_example.py => wine_classification.py} (100%) diff --git a/bayesian-optimization/bayesian_optimization/LICENSE b/bayesian-optimization/LICENSE similarity index 100% rename from bayesian-optimization/bayesian_optimization/LICENSE rename to bayesian-optimization/LICENSE diff --git a/bayesian-optimization/bayesian_optimization/README.md b/bayesian-optimization/README.md similarity index 100% rename from bayesian-optimization/bayesian_optimization/README.md rename to bayesian-optimization/README.md diff --git a/bayesian-optimization/bayesian_optimization/bayesian_optimization_example.py b/bayesian-optimization/bayesian_optimization.py similarity index 100% rename from bayesian-optimization/bayesian_optimization/bayesian_optimization_example.py rename to bayesian-optimization/bayesian_optimization.py diff --git a/bayesian-optimization/cookiecutter.json b/bayesian-optimization/cookiecutter.json deleted file mode 100644 index 295214e..0000000 --- a/bayesian-optimization/cookiecutter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "project_name": "Bayesian Optimization" -} diff --git a/bayesian-optimization/bayesian_optimization/requirements.txt b/bayesian-optimization/requirements.txt similarity index 100% rename from bayesian-optimization/bayesian_optimization/requirements.txt rename to bayesian-optimization/requirements.txt diff --git a/mnist-training/mnist_training/LICENSE b/mnist-training/LICENSE similarity index 100% rename from mnist-training/mnist_training/LICENSE rename to mnist-training/LICENSE diff --git a/mnist-training/mnist_training/README.md b/mnist-training/README.md similarity index 100% rename from mnist-training/mnist_training/README.md rename to mnist-training/README.md diff --git a/mnist-training/cookiecutter.json b/mnist-training/cookiecutter.json deleted file mode 100644 index 94014b4..0000000 --- a/mnist-training/cookiecutter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "project_name": "MNIST Pytorch Training Example" -} diff --git a/mnist-training/mnist_training/mnist_training_example.py b/mnist-training/mnist_training.py similarity index 100% rename from mnist-training/mnist_training/mnist_training_example.py rename to mnist-training/mnist_training.py diff --git a/mnist-training/mnist_training/requirements.txt b/mnist-training/requirements.txt similarity index 100% rename from mnist-training/mnist_training/requirements.txt rename to mnist-training/requirements.txt diff --git a/simple-example/simple_example/LICENSE b/simple-example/LICENSE similarity index 100% rename from simple-example/simple_example/LICENSE rename to simple-example/LICENSE diff --git a/simple-example/simple_example/README.md b/simple-example/README.md similarity index 100% rename from simple-example/simple_example/README.md rename to simple-example/README.md diff --git a/simple-example/cookiecutter.json b/simple-example/cookiecutter.json deleted file mode 100644 index aea629b..0000000 --- a/simple-example/cookiecutter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "project_name": "flyte_example" -} diff --git a/simple-example/simple_example/example.py b/simple-example/example.py similarity index 100% rename from simple-example/simple_example/example.py rename to simple-example/example.py diff --git a/simple-example/simple_example/requirements.txt b/simple-example/requirements.txt similarity index 100% rename from simple-example/simple_example/requirements.txt rename to simple-example/requirements.txt diff --git a/wine-classification/wine_classification/LICENSE b/wine-classification/LICENSE similarity index 100% rename from wine-classification/wine_classification/LICENSE rename to wine-classification/LICENSE diff --git a/wine-classification/wine_classification/README.md b/wine-classification/README.md similarity index 100% rename from wine-classification/wine_classification/README.md rename to wine-classification/README.md diff --git a/wine-classification/cookiecutter.json b/wine-classification/cookiecutter.json deleted file mode 100644 index 311981b..0000000 --- a/wine-classification/cookiecutter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "project_name": "Wine classification" -} diff --git a/wine-classification/wine_classification/requirements.txt b/wine-classification/requirements.txt similarity index 100% rename from wine-classification/wine_classification/requirements.txt rename to wine-classification/requirements.txt diff --git a/wine-classification/wine_classification/wine_classification_example.py b/wine-classification/wine_classification.py similarity index 100% rename from wine-classification/wine_classification/wine_classification_example.py rename to wine-classification/wine_classification.py