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

standard tests list generator #1264

Merged
merged 37 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
127661f
standard tests list generator
samhita-alla Nov 16, 2023
27090e9
bash
samhita-alla Nov 16, 2023
3f28d92
nit
samhita-alla Nov 17, 2023
330bb1a
nit
samhita-alla Nov 17, 2023
8b0cb62
add torch
samhita-alla Nov 17, 2023
3bf2d1b
add torch
samhita-alla Nov 18, 2023
fbcab15
validate tests
samhita-alla Nov 28, 2023
7ad37c7
Merge branch 'master' into tests-list
samhita-alla Nov 28, 2023
36ecc7f
update validation logic
samhita-alla Nov 29, 2023
6d4a7a1
Merge remote-tracking branch 'origin/master' into tests-list
samhita-alla Nov 29, 2023
4e701c1
update validation logic
samhita-alla Nov 29, 2023
8bfe2d9
lint
samhita-alla Nov 29, 2023
910ecb9
debug
samhita-alla Nov 30, 2023
f164b41
Merge remote-tracking branch 'origin/master' into tests-list
samhita-alla Nov 30, 2023
e5d1285
debug
samhita-alla Nov 30, 2023
c1e0d08
debug
samhita-alla Nov 30, 2023
3d04581
debug
samhita-alla Nov 30, 2023
ebe4820
debug
samhita-alla Nov 30, 2023
6608777
debug
samhita-alla Nov 30, 2023
9711de3
modify regex
samhita-alla Nov 30, 2023
acf36b3
debug
samhita-alla Dec 1, 2023
64f4dac
remove re
samhita-alla Dec 1, 2023
015f40d
remove test.py
samhita-alla Dec 1, 2023
30ce825
debug
samhita-alla Dec 1, 2023
adc2eec
debug
samhita-alla Dec 1, 2023
64272f0
debug
samhita-alla Dec 1, 2023
1b112de
remove test.py
samhita-alla Dec 1, 2023
6597f98
debug
samhita-alla Dec 1, 2023
e31c285
change regex
samhita-alla Dec 1, 2023
1ac7e02
debug
samhita-alla Dec 1, 2023
04fe6d5
add env
samhita-alla Dec 1, 2023
b35a191
do not truncate output
samhita-alla Dec 1, 2023
6069c0f
search
samhita-alla Dec 1, 2023
5f345ea
clean string
samhita-alla Dec 2, 2023
8668e13
cleanup
samhita-alla Dec 2, 2023
21c7fb2
incorporate suggestions by Eduardo
samhita-alla Dec 6, 2023
fe80603
remove comment
samhita-alla Dec 6, 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
34 changes: 16 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,17 @@ jobs:
name: Publish artifacts to github release
runs-on: ubuntu-latest
needs: [prerelease]
strategy:
matrix:
python-version: ["3.11"]
eapolinario marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: setup download artifact dir
run: |
mkdir download-artifact
Expand All @@ -140,6 +147,7 @@ jobs:
for i in */; do tar -czvf "../release-snacks/${i%/}.tar.gz" "$i" & done; wait
cd .. && sudo rm -rf download-artifact/
cp flyte_tests_manifest.json release-snacks/flyte_tests_manifest.json
cp flyte_tests.txt release-snacks/flyte_tests.txt
- name: Release test manifest
uses: goreleaser/goreleaser-action@v2
with:
Expand Down Expand Up @@ -203,35 +211,25 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flytekit flytekitplugins-deck-standard
pip install flytekit flytekitplugins-deck-standard torch
pip freeze
- name: Checkout flytesnacks
uses: actions/checkout@v3
with:
repository: flyteorg/flytesnacks
path: flytesnacks
- name: Verify existence of the tests
run: |
python flyte_tests_validate.py
- name: Register specific tests
run: |
for f in \
basics/basics/hello_world.py \
basics/basics/workflow.py \
basics/basics/named_outputs.py \
advanced_composition/advanced_composition/chain_entities.py \
advanced_composition/advanced_composition/dynamics.py \
advanced_composition/advanced_composition/map_task.py \
advanced_composition/advanced_composition/subworkflows.py \
data_types_and_io/data_types_and_io/dataclass.py \
data_types_and_io/data_types_and_io/structured_dataset.py ;
while read -r line;
do
# TODO: unpin version of flytekit once the FlyteFile bug is fixed
pyflyte --config ./boilerplate/flyte/end2end/functional-test-config.yaml \
register \
--project flytesnacks \
--domain development \
--image cr.flyte.org/flyteorg/flytekit:py3.11-1.10.0 \
--image cr.flyte.org/flyteorg/flytekit:py3.11-latest \
--version ${{ env.FLYTESNACKS_VERSION }} \
flytesnacks/examples/$f;
done
- name: End2End
run: |
make end2end_execute
flytesnacks/$line;
done < flyte_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# %% [markdown]
# A simple split function that divides a list into two halves.


# %%
@task
def split(numbers: typing.List[int]) -> Tuple[typing.List[int], typing.List[int], int, int]:
Expand Down Expand Up @@ -65,6 +66,7 @@ def merge(sorted_list1: typing.List[int], sorted_list2: typing.List[int]) -> typ
# Generally speaking, the algorithm will recurse through the list, splitting it in half until it reaches a size that we
# know is efficient enough to run locally. At which point it'll just use the python-builtin sorted function.


# %% [markdown]
# This runs the sorting completely locally. It's faster and more efficient to do so if the entire list fits in memory.
# %%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def parent_wf(a: int) -> Tuple[int, str, str]:
if __name__ == "__main__":
print(f"Running parent_wf(a=3) {parent_wf(a=3)}")


# %% [markdown]
# Interestingly, we can nest a workflow that has a subworkflow within a workflow.
# Workflows can be simply composed from other workflows, even if they are standalone entities. Each of the
Expand Down Expand Up @@ -164,6 +165,7 @@ def ext_workflow(my_input: str) -> Dict:
"parent_workflow_execution",
)


# %% [markdown]
# Define another task that returns the repeated keys (in our case, words) from a dictionary.
# %%
Expand Down
17 changes: 17 additions & 0 deletions flyte_tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
examples/advanced_composition/advanced_composition/chain_entities.py
examples/advanced_composition/advanced_composition/conditions.py
examples/advanced_composition/advanced_composition/decorating_tasks.py
examples/advanced_composition/advanced_composition/decorating_workflows.py
examples/advanced_composition/advanced_composition/dynamics.py
examples/advanced_composition/advanced_composition/map_task.py
examples/advanced_composition/advanced_composition/waiting_for_external_inputs.py
examples/basics/basics/documenting_workflows.py
examples/basics/basics/hello_world.py
examples/basics/basics/named_outputs.py
examples/basics/basics/shell_task.py
examples/basics/basics/workflow.py
examples/data_types_and_io/data_types_and_io/dataclass.py
examples/data_types_and_io/data_types_and_io/enum_type.py
examples/data_types_and_io/data_types_and_io/file.py
examples/data_types_and_io/data_types_and_io/folder.py
examples/data_types_and_io/data_types_and_io/structured_dataset.py
Loading
Loading