Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
help="path to config/configs",
metavar="CONFIG_PATH",
dest="configs",
required=True
)
parser.add_argument("--expdir", type=str, default=None)
parser.add_argument("--logdir", type=str, default=None)
parser.add_argument("--resume", type=str, default=None)
parser.add_argument("--seed", type=int, default=42)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
help="Processed images folder path")
parser.add_argument(
"--num-workers", "-j",
default=1,
type=int,
help="Number of workers to parallel the processing")
parser.add_argument(
"--max-size",
default=None,
required=False,
type=int,
help="Output images size. E.g. 224, 448")
boolean_flag(
parser,
"clear-exif",
default=True,
help="Clear EXIF data")
boolean_flag(
parser,
"grayscale",
default=False,
help="Read images in grayscale")
boolean_flag(
parser,
"expand-dims",
default=True,
help="Expand array shape for grayscale images")
parser.add_argument("--infer", type=int, default=None)
parser.add_argument("--vis", type=int, default=None)
boolean_flag(parser, "check", default=False)
boolean_flag(parser, "db", default=True)
parser.add_argument("--run-delay", type=int, default=1)
boolean_flag(parser, "daemon", default=True)
parser.add_argument("--sampler-id", type=int, default=0)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
help="path to config/configs",
metavar="CONFIG_PATH",
dest="configs",
required=True
)
parser.add_argument("--expdir", type=str, default=None)
parser.add_argument("--logdir", type=str, default=None)
parser.add_argument("--resume", type=str, default=None)
parser.add_argument("--seed", type=int, default=42)
parser.add_argument("--train", type=int, default=None)
parser.add_argument("--valid", type=int, default=None)
parser.add_argument("--infer", type=int, default=None)
parser.add_argument("--vis", type=int, default=None)
boolean_flag(parser, "check", default=False)
boolean_flag(parser, "db", default=True)
parser.add_argument("--run-delay", type=int, default=1)
boolean_flag(parser, "daemon", default=True)
parser.add_argument("--sampler-id", type=int, default=0)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
parser.add_argument(
"--resume",
default=None,
type=str,
metavar="PATH",
help="path to latest checkpoint"
)
parser.add_argument("--seed", type=int, default=42)
boolean_flag(parser, "verbose", default=None)
boolean_flag(parser, "check", default=None)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
)
parser.add_argument(
"-b", "--batch-size", default=None, type=int, help="mini-batch size"
)
parser.add_argument(
"-e", "--num-epochs", default=None, type=int, help="number of epochs"
)
parser.add_argument(
"--resume",
default=None,
type=str,
metavar="PATH",
help="path to latest checkpoint"
)
parser.add_argument("--seed", type=int, default=42)
boolean_flag(parser, "verbose", default=None)
boolean_flag(parser, "check", default=None)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
parser.add_argument(
"-b", "--batch-size", default=None, type=int, help="mini-batch size"
)
parser.add_argument(
"-e", "--num-epochs", default=None, type=int, help="number of epochs"
)
parser.add_argument(
"--resume",
default=None,
type=str,
metavar="PATH",
help="path to latest checkpoint"
)
parser.add_argument("--seed", type=int, default=42)
boolean_flag(parser, "verbose", default=None)
boolean_flag(parser, "check", default=None)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
"-b", "--batch-size", default=None, type=int, help="mini-batch size"
)
parser.add_argument(
"-e", "--num-epochs", default=None, type=int, help="number of epochs"
)
parser.add_argument(
"--resume",
default=None,
type=str,
metavar="PATH",
help="path to latest checkpoint"
)
parser.add_argument("--seed", type=int, default=42)
boolean_flag(parser, "verbose", default=None)
boolean_flag(parser, "check", default=None)
boolean_flag(
parser, "deterministic",
default=None,
help="Deterministic mode if running in CuDNN backend"
)
boolean_flag(
parser, "benchmark",
default=None,
help="Use CuDNN benchmark"
)
return parser
parser.add_argument("--host", type=str, default="127.0.0.1")
parser.add_argument("--port", type=int, default=12000)
parser.add_argument(
"--in-pkl",
"-P",
nargs="+",
metavar="PKL_PATH",
dest="in_pkl",
required=True
)
parser.add_argument(
"--db", type=str, choices=["redis", "mongo"],
default=None, required=True
)
parser.add_argument("--min-reward", type=int, default=None)
utils.boolean_flag(
parser, "use-sqil",
default=False,
help="Use SQIL – 0 reward"
)
return parser