parse pipeline argument string 'None' to None
See original GitHub issueWhen definining a kfp pipeline, with an str argument, if the value is ‘None’, then the component recieve ‘None’. Wouldn’t be better, to parse str ‘None’ to None (NoneType)?
Now:
@component
def task1(arg1: str = None):
if arg1 is None or arg1 == 'None':
print('arg1 is None')
@pipeline
pipeline(arg1: str = 'None'):
task1(arg1)
expected:
@component
def task1(arg1: str = None):
if arg1 is None:
print('arg1 is None')
@pipeline
pipeline(arg1: str = 'None'):
task1(arg1)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Pythonic way to convert the string "None" to a proper None
In short I'm reading data from a URL and need to convert the parameters with the value None to an actual NoneType. I'm...
Read more >Use runtime and type-safe parameters - Azure Pipelines
Parameters have data types such as number and string, and they can be ... The trigger is set to none so that you...
Read more >Pipelines — transformers 3.0.2 documentation - Hugging Face
args_parser ( ArgumentHandler , optional , defaults to None ) – Reference to the object in charge of parsing supplied pipeline parameters.
Read more >Pipelines — sagemaker 2.124.0 documentation
ParameterString (name, default_value=None, enum_values=None)¶. String parameter for pipelines. Create a pipeline string parameter. Parameters.
Read more >Process - Robot Framework
Possible non-string arguments are converted to strings automatically. Process configuration. Run Process and Start Process keywords can be ...
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
No, I don’t think we should ever convert
'None'
toNone
. It could be a legit user intention that they may want to pass'None'
and consume it as string. We don’t want to be “oversmart”.Yes, users can choose whatever they want,
'None'
,'null'
,'NoValue'
, etc. The system doesn’t need to be aware of the user-chosen contract.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.