-
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.
* feat: a working refactor of argo * fix: still working through dag tasks * feat: composite steps added * feat: Fully working deep nested argo workflows
- Loading branch information
1 parent
57aeb48
commit 17b6d02
Showing
16 changed files
with
802 additions
and
1,431 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
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,36 @@ | ||
""" | ||
You can execute this pipeline by: | ||
python examples/01-tasks/scripts.py | ||
The command can be anything that can be executed in a shell. | ||
The stdout/stderr of the execution is captured as execution log and stored in the catalog. | ||
For example: | ||
.catalog | ||
└── seasoned-perlman-1355 | ||
└── hello.execution.log | ||
""" | ||
|
||
from runnable import Job, ShellTask | ||
|
||
|
||
def main(): | ||
# If this step executes successfully, the pipeline will terminate with success | ||
hello_task = ShellTask( | ||
name="hello", | ||
command="echo 'Hello World!'", | ||
terminate_with_success=True, | ||
) | ||
|
||
job = Job(name="hello", task=hello_task) | ||
|
||
job.execute() | ||
|
||
return job | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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 |
---|---|---|
@@ -1,20 +1,2 @@ | ||
dag: | ||
description: | | ||
This is a sample pipeline with one step that | ||
executes a shell command. | ||
You can run this pipeline by: | ||
runnable execute -f examples/01-tasks/scripts.yaml | ||
For example: | ||
.catalog | ||
└── seasoned-perlman-1355 | ||
└── hello.execution.log | ||
start_at: shell | ||
steps: | ||
shell: | ||
type: task | ||
command_type: shell | ||
command: echo "hello world!!" # The path is relative to the root of the project. | ||
next: success | ||
type: shell | ||
command: echo "hello world!!" # The path is relative to the root of the project. |
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,18 @@ | ||
pipeline-executor: | ||
type: "argo" # (1) | ||
config: | ||
pvc_for_runnable: runnable | ||
argoWorkflow: | ||
metadata: | ||
generateName: "argo-" # (2) | ||
namespace: enterprise-mlops | ||
spec: | ||
serviceAccountName: "default-editor" | ||
templateDefaults: | ||
image: harbor.csis.astrazeneca.net/mlops/runnable:latest # (2) | ||
|
||
|
||
run-log-store: # (4) | ||
type: chunked-fs | ||
# config: | ||
# log_folder: /mnt/run_log_store |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
pipeline-executor: | ||
type: "argo" # (1) | ||
config: | ||
image: harbor.csis.astrazeneca.net/mlops/runnable:latest # (2) | ||
service_account_name: default-editor | ||
persistent_volumes: # (3) | ||
- name: magnus-volume | ||
mount_path: /mnt | ||
pvc_for_runnable: runnable | ||
argoWorkflow: | ||
metadata: | ||
generateName: "argo-" # (2) | ||
namespace: enterprise-mlops | ||
spec: | ||
serviceAccountName: "default-editor" | ||
templateDefaults: | ||
image: harbor.csis.astrazeneca.net/mlops/runnable:latest # (2) | ||
|
||
|
||
run-log-store: # (4) | ||
type: chunked-fs | ||
# config: | ||
# log_folder: /mnt/run_log_store | ||
|
||
catalog: | ||
type: file-system | ||
# config: | ||
# catalog_location: /mnt/catalog |
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.