-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from SebastianScherer88/update-server-module-w…
…ith-new-pipeline-dag-structure Update server module with new pipeline dag structure
- Loading branch information
Showing
38 changed files
with
7,738 additions
and
53,482 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
164 changes: 1 addition & 163 deletions
164
data_models/workflow_templates/argo/argo_workflow_template_0.json
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,163 +1 @@ | ||
{ | ||
"metadata": { | ||
"name": "pipeline-test-artifact-pipeline-d5rzf", | ||
"generate_name": "pipeline-test-artifact-pipeline-", | ||
"namespace": "argo", | ||
"uid": "310b62f6-95fb-418f-ab28-e7070b183979", | ||
"resource_version": "9057", | ||
"generation": 1, | ||
"creation_timestamp": "test-datetime-value", | ||
"labels": { | ||
"workflows.argoproj.io/creator": "system-serviceaccount-argo-argo-server" | ||
}, | ||
"managed_fields": [ | ||
{ | ||
"manager": "argo", | ||
"operation": "Update", | ||
"api_version": "argoproj.io/v1alpha1", | ||
"time": "test-datetime-value", | ||
"fields_type": "FieldsV1", | ||
"fields_v1": { | ||
"f:metadata": { | ||
"f:generateName": {}, | ||
"f:labels": { | ||
".": {}, | ||
"f:workflows.argoproj.io/creator": {} | ||
} | ||
}, | ||
"f:spec": {} | ||
} | ||
} | ||
] | ||
}, | ||
"spec": { | ||
"templates": [ | ||
{ | ||
"name": "bettmensch-ai-dag", | ||
"inputs": {}, | ||
"outputs": {}, | ||
"metadata": {}, | ||
"dag": { | ||
"tasks": [ | ||
{ | ||
"name": "convert-to-artifact-0", | ||
"template": "convert-to-artifact", | ||
"arguments": { | ||
"parameters": [ | ||
{ | ||
"name": "a", | ||
"value": "{{workflow.parameters.a}}" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "show-artifact-0", | ||
"template": "show-artifact", | ||
"arguments": { | ||
"artifacts": [ | ||
{ | ||
"name": "a", | ||
"_from": "{{tasks.convert-to-artifact-0.outputs.artifacts.a_art}}" | ||
} | ||
] | ||
}, | ||
"depends": "convert-to-artifact-0" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "convert-to-artifact", | ||
"inputs": { | ||
"parameters": [ | ||
{ | ||
"name": "a" | ||
}, | ||
{ | ||
"name": "a_art", | ||
"default": "null" | ||
} | ||
] | ||
}, | ||
"outputs": { | ||
"artifacts": [ | ||
{ | ||
"name": "a_art", | ||
"path": "a_art" | ||
} | ||
] | ||
}, | ||
"metadata": {}, | ||
"script": { | ||
"image": "bettmensch88/bettmensch.ai:3.11-latest", | ||
"source": "import os\nimport sys\nsys.path.append(os.getcwd())\n\n# --- preprocessing\nimport json\ntry: a = json.loads(r'''{{inputs.parameters.a}}''')\nexcept: a = r'''{{inputs.parameters.a}}'''\n\nfrom bettmensch_ai.io import InputParameter\n\nfrom bettmensch_ai.io import OutputArtifact\na_art = OutputArtifact(\"a_art\")\n\ndef convert_to_artifact(a: InputParameter, a_art: OutputArtifact=None) -> None:\n \"\"\"When decorated with the bettmensch_ai.components.component decorator,\n implements a bettmensch_ai.Component that converts its InputParameter into\n an OutputArtifact.\"\"\"\n with open(a_art.path, 'w') as a_art_file:\n a_art_file.write(str(a))\nconvert_to_artifact(a,a_art)", | ||
"name": "", | ||
"command": [ | ||
"python" | ||
], | ||
"resources": { | ||
"limits": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
}, | ||
"requests": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
} | ||
}, | ||
"image_pull_policy": "Always" | ||
}, | ||
"retry_strategy": { | ||
"limit": "1", | ||
"retry_policy": "OnError" | ||
} | ||
}, | ||
{ | ||
"name": "show-artifact", | ||
"inputs": { | ||
"artifacts": [ | ||
{ | ||
"name": "a", | ||
"path": "a" | ||
} | ||
] | ||
}, | ||
"outputs": {}, | ||
"metadata": {}, | ||
"script": { | ||
"image": "bettmensch88/bettmensch.ai:3.11-latest", | ||
"source": "import os\nimport sys\nsys.path.append(os.getcwd())\n\n# --- preprocessing\nimport json\n\nfrom bettmensch_ai.io import InputArtifact\na = InputArtifact(\"a\")\n\ndef show_artifact(a: InputArtifact) -> None:\n \"\"\"When decorated with the bettmensch_ai.components.component decorator,\n implements a bettmensch_ai.Component that prints the values of its\n InputArtifact.\"\"\"\n with open(a.path, 'r') as a_art_file:\n a_content = a_art_file.read()\n print(f'Content of input artifact a: {a_content}')\nshow_artifact(a)", | ||
"name": "", | ||
"command": [ | ||
"python" | ||
], | ||
"resources": { | ||
"limits": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
}, | ||
"requests": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
} | ||
}, | ||
"image_pull_policy": "Always" | ||
}, | ||
"retry_strategy": { | ||
"limit": "1", | ||
"retry_policy": "OnError" | ||
} | ||
} | ||
], | ||
"entrypoint": "bettmensch-ai-dag", | ||
"arguments": { | ||
"parameters": [ | ||
{ | ||
"name": "a", | ||
"value": "Param A" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
{"metadata": {"name": "pipeline-test-artifact-pipeline-jx7pb", "generate_name": "pipeline-test-artifact-pipeline-", "namespace": "argo", "uid": "e2e6b22b-4dfc-413d-ad43-f06a3b03cb92", "resource_version": "7515", "generation": 1, "creation_timestamp": "07/12/2024", "labels": {"workflows.argoproj.io/creator": "system-serviceaccount-argo-argo-server"}, "managed_fields": [{"manager": "argo", "operation": "Update", "api_version": "argoproj.io/v1alpha1", "time": "07/12/2024", "fields_type": "FieldsV1", "fields_v1": {"f:metadata": {"f:generateName": {}, "f:labels": {".": {}, "f:workflows.argoproj.io/creator": {}}}, "f:spec": {}}}]}, "spec": {"templates": [{"name": "bettmensch-ai-inner-dag", "inputs": {"parameters": [{"name": "a", "value": "Param A"}]}, "outputs": {"artifacts": [{"name": "b", "_from": "{{tasks.show-artifact-0.outputs.artifacts.b}}"}]}, "metadata": {}, "dag": {"tasks": [{"name": "convert-to-artifact-0", "template": "convert-to-artifact", "arguments": {"parameters": [{"name": "a", "value": "{{inputs.parameters.a}}"}]}}, {"name": "show-artifact-0", "template": "show-artifact", "arguments": {"artifacts": [{"name": "a", "_from": "{{tasks.convert-to-artifact-0.outputs.artifacts.a_art}}"}]}, "depends": "convert-to-artifact-0"}]}}, {"name": "convert-to-artifact", "inputs": {"parameters": [{"name": "a"}, {"name": "a_art", "default": "null"}]}, "outputs": {"artifacts": [{"name": "a_art", "path": "a_art"}]}, "metadata": {}, "script": {"image": "bettmensch88/bettmensch.ai-standard:3.11-latest", "source": "import os\nimport sys\nsys.path.append(os.getcwd())\n\n# --- preprocessing\nimport json\ntry: a = json.loads(r'''{{inputs.parameters.a}}''')\nexcept: a = r'''{{inputs.parameters.a}}'''\n\nfrom bettmensch_ai.pipelines.io import InputParameter\n\nfrom bettmensch_ai.pipelines.io import OutputArtifact\na_art = OutputArtifact(\"a_art\")\n\ndef convert_to_artifact(a: InputParameter, a_art: OutputArtifact=None) -> None:\n \"\"\"When decorated with the bettmensch_ai.components.component decorator,\n implements a bettmensch_ai.Component that converts its InputParameter into\n an OutputArtifact.\"\"\"\n with open(a_art.path, 'w') as a_art_file:\n a_art_file.write(str(a))\n\nconvert_to_artifact(a,a_art)\n", "name": "", "command": ["python"], "resources": {"limits": {"cpu": "100m", "memory": "100Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "image_pull_policy": "Always"}, "retry_strategy": {"limit": "1", "retry_policy": "OnError"}}, {"name": "show-artifact", "inputs": {"parameters": [{"name": "b", "default": "null"}], "artifacts": [{"name": "a", "path": "a"}]}, "outputs": {"artifacts": [{"name": "b", "path": "b"}]}, "metadata": {}, "script": {"image": "bettmensch88/bettmensch.ai-standard:3.11-latest", "source": "import os\nimport sys\nsys.path.append(os.getcwd())\n\n# --- preprocessing\nimport json\n\nfrom bettmensch_ai.pipelines.io import InputParameter\n\nfrom bettmensch_ai.pipelines.io import InputArtifact\na = InputArtifact(\"a\")\n\nfrom bettmensch_ai.pipelines.io import OutputArtifact\nb = OutputArtifact(\"b\")\n\ndef show_artifact(a: InputArtifact, b: OutputArtifact=None) -> None:\n \"\"\"When decorated with the bettmensch_ai.components.component decorator,\n implements a bettmensch_ai.Component that prints the values of its\n InputArtifact.\"\"\"\n with open(a.path, 'r') as a_art_file:\n a_content = a_art_file.read()\n print(f'Content of input artifact a: {a_content}')\n with open(b.path, 'w') as b_art_file:\n b_art_file.write(str(a_content))\n\nshow_artifact(a,b)\n", "name": "", "command": ["python"], "resources": {"limits": {"cpu": "100m", "memory": "100Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "image_pull_policy": "Always"}, "retry_strategy": {"limit": "1", "retry_policy": "OnError"}}, {"name": "bettmensch-ai-outer-dag", "inputs": {}, "outputs": {}, "metadata": {}, "dag": {"tasks": [{"name": "bettmensch-ai-inner-dag", "template": "bettmensch-ai-inner-dag", "arguments": {"parameters": [{"name": "a", "value": "{{workflow.parameters.a}}"}]}}]}}], "entrypoint": "bettmensch-ai-outer-dag", "arguments": {"parameters": [{"name": "a", "value": "Param A"}]}}} |
Oops, something went wrong.