We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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'
Dataset should works as artificat
Impacted by this bug? Give it a 👍.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
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 👍.
The text was updated successfully, but these errors were encountered: