Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flytekit add async agent test, fix delete task agent service and fix python3.8 asyncio to_thread issue #1848

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7f00764
Array node map task (#1640)
eapolinario Aug 4, 2023
029c612
Add agent ctrl-c handler to call the delete function. (Reupload) (#1782)
Future-Outlier Aug 9, 2023
5ee6b7c
Add tags to execution (#1723)
pingsutw Aug 10, 2023
13eba43
#3026: add type datetime.date (#1786)
troychiu Aug 11, 2023
63e2d0a
Add type hint for base_tas.py compile method (#1789)
Future-Outlier Aug 12, 2023
ea697a1
Beautified pyflyte run even for every task and workflow (#1783)
kumare3 Aug 12, 2023
3cd008c
Async Agent (#1712)
pingsutw Aug 12, 2023
bdfbdc8
Add type annotations for configuration file (#1792)
Future-Outlier Aug 15, 2023
4ae5224
Add type annotations for tensorflow model test transformation (#1791)
Future-Outlier Aug 15, 2023
ba61209
Add Azure-specific headers when uploading to blob storage (#1784)
devictr Aug 17, 2023
1053e01
Add async delete function in base_agent (#1800)
Future-Outlier Aug 19, 2023
28bb377
Add support for execution name prefixes (#1803)
troychiu Aug 21, 2023
e8dc497
Remove ref in output (#1794)
wild-endeavor Aug 21, 2023
7ef9a63
Inherit directly from DataClassJsonMixin instead of using @dataclass_…
ringohoffman Aug 21, 2023
d10836e
Async file sensor (#1790)
pingsutw Aug 23, 2023
154c43c
Eager workflows to support async workflows (#1579)
cosmicBboy Aug 25, 2023
a8435ea
Enable SecretsManager.get to load and return bytes (#1798)
ysysys3074 Aug 25, 2023
6bdb02d
Batch upload flyte directory (#1806)
pingsutw Aug 26, 2023
45f0198
Better error messaging for overrides (#1807)
kumare3 Aug 28, 2023
6562c80
Run remote Launchplan from `pyflyte run` (#1785)
kumare3 Aug 29, 2023
3d400dc
Add is none function (#1757)
pingsutw Aug 29, 2023
297f1bf
Dynamic workflow should not throw nested task warning (#1812)
Aug 31, 2023
e6052de
Add a manual image building GH action (#1816)
wild-endeavor Sep 1, 2023
664ca67
catch abfs protocol in data_persistence.py/get_filesystem and set ano…
fiedlerNr9 Sep 1, 2023
c5a7158
Fix list of annotated structured dataset (#1817)
wild-endeavor Sep 1, 2023
1d34d04
Support the flytectl config.yaml admin.clientSecretEnvVar option in f…
chaohengstudent Sep 6, 2023
a46badb
Async agent delete function for while loop case (#1802)
Future-Outlier Sep 7, 2023
770c95c
fix docs warnings (#1827)
samhita-alla Sep 11, 2023
f6ab14e
Fix extract_task_module (#1829)
pingsutw Sep 11, 2023
5077299
Feat: Add type support for pydantic BaseModels (#1660)
ArthurBook Sep 11, 2023
f3368c9
Make FlyteRemote slightly more copy/pastable (#1830)
katrogan Sep 12, 2023
d617ea6
Pyflyte meta inputs (#1823)
kumare3 Sep 12, 2023
27e2d00
Use mashumaro to serialize/deserialize dataclass (#1735)
hhcs9527 Sep 12, 2023
6e2cec1
Databricks Agent (#1797)
Future-Outlier Sep 12, 2023
0bea129
Prometheus metrics (#1815)
pingsutw Sep 13, 2023
18bd35f
Pyflyte register optionally activates schedule (#1832)
kumare3 Sep 14, 2023
925884f
Remove versions 3.9 and 3.10 (#1831)
wild-endeavor Sep 14, 2023
1725986
Snowflake agent (#1799)
hhcs9527 Sep 15, 2023
8197069
Update agent metric name (#1835)
pingsutw Sep 15, 2023
7f5e657
MemVerge MMCloud Agent (#1821)
edwinyyyu Sep 15, 2023
1aed4ef
Add download badges in readme (#1836)
pingsutw Sep 18, 2023
16c73c0
Eager local entrypoint and support for offloaded types (#1833)
cosmicBboy Sep 18, 2023
8cbbe53
update requirements and add snowflake agent to api reference (#1838)
samhita-alla Sep 19, 2023
8761ce7
Fix: Make sure decks created in elastic task workers are transferred …
fg91 Sep 19, 2023
ad898c6
add accept grpc (#1841)
wild-endeavor Sep 20, 2023
83959ae
Feat: Enable `flytekit` to authenticate with proxy in front of FlyteA…
fg91 Sep 20, 2023
dd24867
Backfill command now supports failure-policy (#1840)
kumare3 Sep 21, 2023
63b98a7
Pass cluster pool when creating executions (#1208)
iaroslav-ciupin Sep 22, 2023
7411461
Add more clear error message when fetching secrets (#1847)
ysysys3074 Sep 23, 2023
d7d7275
add better test and fix do task agent-service
Sep 23, 2023
15ae234
for python3.8 test
Sep 25, 2023
d796ebe
Pyflyte run workflows correctly handles Optional[TYPE] = None (#1849)
cosmicBboy Sep 26, 2023
e17acf3
Bump gitpython (#1828)
dependabot[bot] Sep 26, 2023
23d033d
Bump cryptography (#1844)
dependabot[bot] Sep 26, 2023
e46c347
update codecov config in pythonbuild ci (#1852)
cosmicBboy Sep 26, 2023
ff59030
Improved gate node handling (#1850)
kumare3 Sep 26, 2023
569dde2
update codecov yaml, make eager wf test more stable (#1854)
cosmicBboy Sep 27, 2023
a256959
more codecov updates (#1856)
cosmicBboy Sep 27, 2023
dc36d39
make sure mlflow plugin works with python 3.11 (#1855)
bcvanmeurs Sep 27, 2023
7added8
Merge branch 'master' of https://github.com/Future-Outlier/flytekit i…
Oct 3, 2023
dce7e23
Agent get secret function (#1851)
Future-Outlier Sep 28, 2023
483082a
Better Azure blob storage support (#1842)
Tom-Newton Sep 28, 2023
df82def
Remove Envd from dockerfile (#1814)
pingsutw Sep 29, 2023
08fff35
Update agent uri format (#1861)
hhcs9527 Oct 1, 2023
d5e573c
modified setup.py in flytekit-mmcloud (#1864)
helenzhangyc Oct 2, 2023
e834d53
Label request_failure metric with error_code (#1862)
Oct 3, 2023
660ae57
resolve conflict
Oct 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/build_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish Python Package

on:
workflow_dispatch:

jobs:
build-and-push-docker-images-manual:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Prepare Flytekit Image Names
id: flytekit-names
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/flytekit
tags: |
py${{ matrix.python-version }}-${{ github.sha }}
- name: Build & Push Flytekit Python${{ matrix.python-version }} Docker Image to Github Registry
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64, linux/amd64
push: true
tags: ${{ steps.flytekit-names.outputs.tags }}
build-args: |
VERSION=${{ github.sha }}
DOCKER_IMAGE=ghcr.io/${{ github.repository_owner }}/flytekit:py${{ matrix.python-version }}-${{ github.sha }}
PYTHON_VERSION=${{ matrix.python-version }}
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max

build-and-push-flyteagent-images-manual:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Prepare Flyte Agent Image Names
id: flyteagent-names
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/flyteagent
tags: |
${{ github.sha }}
- name: Push External Plugin Service Image to GitHub Registry
uses: docker/build-push-action@v2
with:
context: "."
platforms: linux/arm64, linux/amd64
push: true
tags: ${{ steps.flyteagent-names.outputs.tags }}
build-args: |
VERSION=${{ github.sha }}
file: ./Dockerfile.agent
cache-from: type=gha
cache-to: type=gha,mode=max
67 changes: 51 additions & 16 deletions .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
exclude:
# Ignore this test because we failed to install docker-py
# docker-py will install pywin32==227, whereas pywin only added support for python 3.10 in version 301.
# For more detail, see https://github.com/flyteorg/flytekit/pull/856#issuecomment-1067152855
- python-version: 3.10
os: windows-latest
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -47,13 +41,56 @@ jobs:
with:
fail_ci_if_error: false

build-integration:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# python 3.11 has intermittent issues with the docker build + push step
# https://github.com/flyteorg/flytekit/actions/runs/5800978835/job/15724237979?pr=1579
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }}
- name: Install dependencies
run: make setup && pip freeze
- name: Install FlyteCTL
uses: unionai-oss/flytectl-setup-action@master
- name: Setup Flyte Sandbox
run: |
flytectl demo start
flytectl config init
- name: Build and push to local registry
run: |
docker build . -f Dockerfile.dev -t localhost:30000/flytekit:dev --build-arg PYTHON_VERSION=${{ matrix.python-version }}
- name: Integration Test with coverage
env:
FLYTEKIT_IMAGE: localhost:30000/flytekit:dev
FLYTEKIT_CI: 1
run: make integration_test_codecov
- name: Codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: false

build-plugins:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.11"]
plugin-names:
# Please maintain an alphabetical order in the following list
- flytekit-aws-athena
Expand Down Expand Up @@ -104,12 +141,6 @@ jobs:
plugin-names: "flytekit-greatexpectations"
# onnxruntime does not support python 3.10 yet
# https://github.com/microsoft/onnxruntime/issues/9782
- python-version: 3.10
plugin-names: "flytekit-onnx-pytorch"
- python-version: 3.10
plugin-names: "flytekit-onnx-scikitlearn"
- python-version: 3.10
plugin-names: "flytekit-onnx-tensorflow"
- python-version: 3.11
plugin-names: "flytekit-onnx-pytorch"
- python-version: 3.11
Expand Down Expand Up @@ -158,10 +189,14 @@ jobs:
# onnx plugins does not support protobuf>4 yet (in fact it is tensorflow that
# does not support that yet). More details in https://github.com/onnx/onnx/issues/4239.
if [[ ${{ matrix.plugin-names }} == *"onnx"* || ${{ matrix.plugin-names }} == "flytekit-whylogs" || ${{ matrix.plugin-names }} == "flytekit-mlflow" ]]; then
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python coverage run -m pytest tests
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python coverage run -m pytest tests --cov=./ --cov-report=xml --cov-append
else
coverage run -m pytest tests
coverage run -m pytest tests --cov=./ --cov-report=xml --cov-append
fi
- name: Codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
Expand Down
54 changes: 27 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
- repo: https://github.com/conorfalvey/check_pdb_hook
rev: 0.0.9
hooks:
- id: check_pdb_hook
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
- repo: https://github.com/conorfalvey/check_pdb_hook
rev: 0.0.9
hooks:
- id: check_pdb_hook
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ sphinx:
python:
install:
- requirements: doc-requirements.txt
- requirements: docs/requirements.txt
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apt-get update && apt-get install build-essential -y
RUN pip install -U flytekit==$VERSION \
flytekitplugins-pod==$VERSION \
flytekitplugins-deck-standard==$VERSION \
flytekitplugins-envd==$VERSION \
scikit-learn

RUN useradd -u 1000 flytekit
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MAINTAINER Flyte Team <[email protected]>
LABEL org.opencontainers.image.source=https://github.com/flyteorg/flytekit

ARG VERSION
RUN pip install prometheus-client
RUN pip install -U flytekit==$VERSION flytekitplugins-bigquery==$VERSION

CMD pyflyte serve --port 8000
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export REPOSITORY=flytekit

PIP_COMPILE = pip-compile --upgrade --verbose
PIP_COMPILE = pip-compile --upgrade --verbose --resolver=backtracking
MOCK_FLYTE_REPO=tests/flytekit/integration/remote/mock_flyte_repo/workflows

.SILENT: help
Expand Down Expand Up @@ -49,8 +49,6 @@ test: lint unit_test

.PHONY: unit_test_codecov
unit_test_codecov:
# Ensure coverage file
rm coverage.xml || true
$(MAKE) CODECOV_OPTS="--cov=./ --cov-report=xml --cov-append" unit_test

.PHONY: unit_test
Expand All @@ -60,9 +58,17 @@ unit_test:
pytest -m "not sandbox_test" tests/flytekit/unit/ --ignore=tests/flytekit/unit/extras/tensorflow ${CODECOV_OPTS} && \
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python pytest tests/flytekit/unit/extras/tensorflow ${CODECOV_OPTS}

.PHONY: integration_test_codecov
integration_test_codecov:
$(MAKE) CODECOV_OPTS="--cov=./ --cov-report=xml --cov-append" integration_test

.PHONY: integration_test
integration_test:
pytest tests/flytekit/integration/experimental ${CODECOV_OPTS}

doc-requirements.txt: export CUSTOM_COMPILE_COMMAND := make doc-requirements.txt
doc-requirements.txt: doc-requirements.in install-piptools
docker run --platform linux/amd64 --rm -it --volume .:/root python:3.9-slim-buster sh -c "cd /root && apt-get update && apt-get install git -y && pip install pip-tools && pip-compile --upgrade --verbose doc-requirements.in"
$(PIP_COMPILE) $<

${MOCK_FLYTE_REPO}/requirements.txt: export CUSTOM_COMPILE_COMMAND := make ${MOCK_FLYTE_REPO}/requirements.txt
${MOCK_FLYTE_REPO}/requirements.txt: ${MOCK_FLYTE_REPO}/requirements.in install-piptools
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
[![PyPI version fury.io](https://badge.fury.io/py/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
[![PyPI download day](https://img.shields.io/pypi/dd/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
[![PyPI download month](https://img.shields.io/pypi/dm/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
[![PyPI total download](https://static.pepy.tech/badge/flytekit)](https://static.pepy.tech/badge/flytekit)
[![PyPI format](https://img.shields.io/pypi/format/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
[![PyPI implementation](https://img.shields.io/pypi/implementation/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
![Codecov](https://img.shields.io/codecov/c/github/flyteorg/flytekit?style=plastic)
[![Codecov](https://img.shields.io/codecov/c/github/flyteorg/flytekit?style=plastic)](https://app.codecov.io/gh/flyteorg/flytekit)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/flytekit.svg)](https://pypi.python.org/pypi/flytekit/)
[![Docs](https://readthedocs.org/projects/flytekit/badge/?version=latest&style=plastic)](https://flytekit.rtfd.io)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand Down
12 changes: 7 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ignore_paths:
ignore:
- "flytekit/bin"
- "flytekit/clis/**/*"
- "test_*.py"
- "flytekit/__init__.py"
- "flytekit/extend/__init__.py"
- "flytekit/testing/__init__.py"
- "tests/*"
- "tests/**/*"
- "setup.py"
- "plugins/tests/**/*"
- "plugins/setup.py"
- "plugins/**/setup.py"
4 changes: 3 additions & 1 deletion dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hypothesis
joblib
mock
pytest
pytest-asyncio
pytest-cov
mypy
pre-commit
Expand All @@ -17,7 +18,7 @@ keyrings.alt
# Only install tensorflow if not running on an arm Mac.
tensorflow==2.8.1; python_version<'3.11' and (platform_machine!='arm64' or platform_system!='Darwin')
# Tensorflow release candidate supports python 3.11
tensorflow==2.12.0rc1; python_version>='3.11' and (platform_machine!='arm64' or platform_system!='Darwin')
tensorflow==2.13.0; python_version>='3.11' and (platform_machine!='arm64' or platform_system!='Darwin')

# Newer versions of torch bring in nvidia dependencies that are not present in windows, so
# we put this constraint while we do not have per-environment requirements files
Expand All @@ -30,3 +31,4 @@ types-protobuf
types-croniter
types-mock
autoflake
prometheus-client
18 changes: 11 additions & 7 deletions doc-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ sphinx-autoapi
sphinx-copybutton
sphinx_fontawesome
sphinx-panels
sphinxcontrib-youtube
sphinxcontrib-youtube==1.2.0
cryptography
google-api-core[grpc]
scikit-learn
sphinx-tags
sphinx-click
retry
mashumaro

# Packages for Plugin docs
# Package name Plugin needing it
Expand All @@ -29,23 +31,25 @@ plotly # deck
pandas_profiling # deck
dolt_integrations # dolt
great-expectations # greatexpectations
datasets # huggingface
kubernetes # k8s-pod
modin # modin
pandera # pandera
papermill # papermill
jupyter # papermill
polars # polars
pyspark # spark
sqlalchemy # sqlalchemy
torch # pytorch
# TODO: Remove after buf migration is done and packages updated
# skl2onnx # onnxscikitlearn
# tf2onnx # onnxtensorflow
skl2onnx # onnxscikitlearn
tf2onnx # onnxtensorflow
tensorflow # onnxtensorflow
whylogs # whylogs
whylogs==1.3.3 # whylogs
whylabs-client # whylogs
ray # ray
ray==2.6.3 # ray
scikit-learn # scikit-learn
dask[distributed] # dask
vaex # vaex
mlflow # mlflow
mlflow==2.7.0 # mlflow
duckdb # duckdb
snowflake-connector-python # snowflake
Loading