MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / str2bool

Function str2bool

NLP/UNIMO/src/utils/args.py:24–28  ·  view source on GitHub ↗

str to bool

(v)

Source from the content-addressed store, hash-verified

22
23
24def str2bool(v):
25 """str to bool"""
26 # because argparse does not support to parse "true, False" as python
27 # boolean directly
28 return v.lower() in ("true", "t", "1")
29
30
31class ArgumentGroup(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected