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

[sdk] Output[Dataset] not working in local execution (subprocess and docker runner) #11661

Open
10ravikumar opened this issue Feb 21, 2025 · 0 comments

Comments

@10ravikumar
Copy link

10ravikumar commented Feb 21, 2025

Environment

  • KFP version: 2.3.0
  • KFP SDK version: 2.11.0
  • All dependencies version:

Steps to reproduce

from kfp import local
from kfp import dsl
from kfp.dsl import Output, Artifact
import json

local.init(runner=local.SubprocessRunner())

@dsl.component
def add(a: int, b: int, out_artifact: Output[Datset]):
import json
result = json.dumps(a + b)
with open(out_artifact.path, 'w') as f:
f.write(result)
out_artifact.metadata['operation'] = 'addition'

task = add(a=1, b=2)

with open(task.outputs['out_artifact'].path) as f:
contents = f.read()

assert json.loads(contents) == 3
assert task.outputs['out_artifact'].metadata['operation'] == 'addition'

Expected result

Dataset should works as artificat

Materials and Reference


Impacted by this bug? Give it a 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant