Skip to content

Commit

Permalink
[Test] Add subpath to test remote workflow with relative subpath fold…
Browse files Browse the repository at this point in the history
…er (#1)
  • Loading branch information
GiladShapira94 authored Apr 25, 2023
1 parent 6fde065 commit 5bd2dca
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test_remote_workflow_subpath/add_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

def add_1(x):
x = x+3

return x
5 changes: 5 additions & 0 deletions test_remote_workflow_subpath/add_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

def add_2(x):
x = x+2

return x
5 changes: 5 additions & 0 deletions test_remote_workflow_subpath/nuclio-func.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


def handler(conext,event):

return 1
26 changes: 26 additions & 0 deletions test_remote_workflow_subpath/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
kind: project
metadata:
name: testing-workdir
created: '2023-03-26T07:22:52.792000'
spec:
functions:
- name: add-1
kind: job
image: mlrun/mlrun
handler: add_1.add_1
with_repo: true
- name: add-2
kind: job
image: mlrun/mlrun
handler: add_2.add_2
with_repo: true
workflows:
- path: ./test_remote_workflow_subpath/workflow.py
name: main
artifacts: []
conda: ''
source: git://github.com/mlrun/system-tests.git#master
subpath: ./test_remote_workflow_subpath
origin_url: git://github.com/mlrun/system-tests.git#master
load_source_on_run: true
desired_state: online
15 changes: 15 additions & 0 deletions test_remote_workflow_subpath/workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


from kfp import dsl
from mlrun.platforms import auto_mount
import os
import sys
import mlrun

funcs = {}


def kfpipeline(x):
add_1 = mlrun.run_function('add-1',params={'x':x},outputs=['return'])

add_2 = mlrun.run_function('add-2',params={'x':add_1.outputs['return']})

0 comments on commit 5bd2dca

Please sign in to comment.