[v2compat] wrong param passed when param contains JSON
See original GitHub issueEnvironment
- KFP SDK version: master branch
Steps to reproduce
import kfp
from kfp import dsl
from kfp.components import create_component_from_func
@create_component_from_func
def test(json_param: str):
print(json_param)
@dsl.pipeline(name='bug-json-param')
def my_pipeline(
json_param: str = '{"a":"b"}',
value: str = 'c',
):
test(json_param).set_display_name('test1')
test('{"a":"' + f'{value}' + '"}').set_display_name('test2')
if __name__ == '__main__':
kfp.Client().create_run_from_pipeline_func(
my_pipeline,
arguments={},
mode=dsl.PipelineExecutionMode.V2_COMPATIBLE,
)
I got the following log for test2
task (task1
is expected).
{\"a\":\"c\"}
Expected result
{"a":"c"}
Materials and Reference
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (6 by maintainers)
Top Results From Across the Web
RESTful API - Correct behaviour when spurious/not requested ...
We are developing a RESTful api that accepts query parameters in the request in the form of JSON encoded data.
Read more >Request Parameters and JSON | Revel - A Web Application ...
Bind(target,paramname) , JSON data is always ignored, you can call c.Params.BindJSON(target) to bind the JSON data to the specified object. You must pass...
Read more >typeerror: expected str, bytes or os.pathlike object - You.com | The ...
So basically, argv returns a list of all the parameters passed in with the name ... The error is happening because the function...
Read more >oggm.utils._funcs — OGGM 1.5.3 documentation
PARAMS ['rgi_version'] if version in _RGI_METADATA: return ... format(pbs.type)) try: # Shapely v2 compat pbs = pbs.geoms except AttributeError: pass # Out ...
Read more >Is it a bad idea to pass JSON objects on the query string for an ...
Many servers will log URIs and query string parameters which may leave sensitive data in places you dont want it. For this kind...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zijianjoy we might consider keeping the sanitization in UI permanently, because artifact naming convention changed when going to KFP v2. In v2, we will no longer sanitize artifact names automatically in SDK.
I see, thank you for confirming!