How to use boolean params as string values without converting to a boolean values #1477
Answered
by
polyaxon-team
polyaxon-team
asked this question in
Q&A
-
I have a problem with plx CLI, a param of type - {name: add_noise, type: str, isOptional: true, value: "False"} Polyaxon compiles the YAML to inputs:
- ...
- name: add_noise
type: str
value: false <-----
isOptional: true
run:
...
container:
args:
- ...
- '--add_noise=false' <---- |
Beta Was this translation helpful? Give feedback.
Answered by
polyaxon-team
Apr 7, 2022
Replies: 1 comment
-
To force the string value, you should use double quotation to avoid Yaml/Json interpreting the value as bool - {name: add_noise, type: str, isOptional: true, value: '"False"'} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
polyaxon-team
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To force the string value, you should use double quotation to avoid Yaml/Json interpreting the value as bool
"..."
:- {name: add_noise, type: str, isOptional: true, value: '"False"'}