-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: minor bugs with on faliure behaviours * fix: minor bugs with on faliure behaviours * fix: adding secrets to sdk * docs: adding more examples * docs: still working through * docs: adding more examples * fix: minor changes to API * fix: notebook working with map parameters * docs: more examples * docs: more examples * chore: gitignore * chore: gitignore * fix: Bug in SDK with nested nodes * fix: Bug in argo with failure nodes * docs: Added patching * fix: Bug with mocked and retry implementation * fix: disable posthog
- Loading branch information
1 parent
ce7a32d
commit b0c3d51
Showing
71 changed files
with
2,021 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ __pycache__/ | |
# C extensions | ||
*.so | ||
|
||
# examples run time | ||
*_out* | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ dag: | |
next: success | ||
step_4: | ||
type: stub | ||
next: fail | ||
next: success | ||
success: | ||
type: success | ||
fail: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
dag: | ||
description: | | ||
Demonstrates passing parameters to and from a notebook. | ||
runnable can extract JSON serializable types, pydantic models, objects from notebook. | ||
eg: write_parameters_from_notebook | ||
But can only inject JSON type parameters to a notebook. | ||
eg: read_parameters_in_notebook | ||
pydantic parameters are injected as dictionary. | ||
Run the below example as: | ||
runnable execute examples/03-parameters/passing_parameters_notebook.yaml | ||
start_at: write_parameters_from_notebook | ||
steps: | ||
write_parameters_from_notebook: | ||
type: task | ||
command_type: notebook | ||
command: examples/common/write_parameters.ipynb | ||
returns: | ||
- name: df | ||
kind: object | ||
- name: integer | ||
- name: floater | ||
- name: stringer | ||
- name: pydantic_param | ||
- name: score | ||
next: read_parameters | ||
read_parameters: | ||
type: task | ||
command: examples.common.functions.read_parameter | ||
next: read_parameters_in_notebook | ||
read_parameters_in_notebook: | ||
type: task | ||
command_type: notebook | ||
command: examples/common/read_parameters.ipynb | ||
next: success | ||
success: | ||
type: success | ||
fail: | ||
type: fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
dag: | ||
description: | | ||
The below example shows how to set/get parameters in python | ||
tasks of the pipeline. | ||
The function, set_parameter, returns | ||
- JSON serializable | ||
- pydantic models | ||
- pandas dataframe, any "object" type | ||
pydantic models are implicitly handled by runnable | ||
but "object" types should be marked as "pickled". | ||
Use pickled even for python data types is advised for | ||
reasonably large collections. | ||
Run the pipeline as: | ||
runnable execute -f examples/03-parameters/passing_parameters_python.yaml | ||
start_at: write_parameters | ||
steps: | ||
write_parameters: | ||
type: task | ||
command: examples.common.functions.write_parameter | ||
returns: | ||
- name: df | ||
kind: object | ||
- name: integer | ||
- name: floater | ||
- name: stringer | ||
- name: pydantic_param | ||
- name: score | ||
|
||
next: read_parameters | ||
read_parameters: | ||
type: task | ||
command: examples.common.functions.read_parameter | ||
next: success | ||
success: | ||
type: success | ||
fail: | ||
type: fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
dag: | ||
description: | | ||
Demonstrates passing parameters to and from shell scripts. | ||
We can extract only json style parameters from shell scripts. | ||
eg: write_parameters_in_shell | ||
We can only read json style parameters from shell scripts. | ||
eg: read_parameters_in_shell | ||
pydantic parameters are injected as json. | ||
Run the pipeline as: | ||
runnable execute -f examples/03-parameters/passing_parameters_shell.yaml | ||
start_at: write_parameters_in_shell | ||
steps: | ||
write_parameters_in_shell: | ||
type: task | ||
command_type: shell | ||
command: | | ||
export integer=1 | ||
export floater=3.14 | ||
export stringer="hello" | ||
export pydantic_param='{"x": 10, "foo": "bar"}' | ||
export score=0.9 | ||
returns: | ||
- name: integer | ||
- name: floater | ||
- name: stringer | ||
- name: pydantic_param | ||
- name: score | ||
next: read_parameters | ||
read_parameters: | ||
type: task | ||
command: examples.common.functions.read_unpickled_parameter | ||
next: read_parameters_in_shell | ||
read_parameters_in_shell: | ||
type: task | ||
command_type: shell | ||
command: | | ||
if [ "$integer" = 1 ] \ | ||
&& [ "$floater" = 3.14 ] \ | ||
&& [ "$stringer" = "hello" ] \ | ||
&& [ "$pydantic_param" = '{"x": 10, "foo": "bar"}' ]; then | ||
echo "yaay" | ||
exit 0; | ||
else | ||
echo "naay" | ||
exit 1; | ||
fi | ||
next: success | ||
success: | ||
type: success | ||
fail: | ||
type: fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.