def _confirm_parameter_value(target, config, source): prompt = ("Value assigned to '{}' in the source ('{}')\n" "differs from the one specified in the experiment\n" "configuration ('{}').\n" "Do you want to overwrite the source specified value?".format( target, source, config)) return cli.confirm(prompt, default=True)
def _confirm_run(args, experiment, op): prompt = ("You are about to run {experiment}{op_name}{remote_suffix}\n" "{parameters}" "Continue?".format(experiment=experiment, op_name=_format_operation(op), remote_suffix=_format_remote_suffix(args), parameters=_format_parameters(op.parameters))) return cli.confirm(prompt, default=True)
def remote_op(op, prompt, default_resp, args): if not args.yes: cli.out(prompt) if args.yes or cli.confirm("Continue?", default_resp): try: op() except OperationNotSupported as e: cli.error(e) except OperationError as e: cli.error(e)
def _confirm_rm(args): prompt = ("You are about to delete {}. " "Do you want to delete all project files on the disk?".format( args.project_name)) return cli.confirm(prompt, default=False)
def _confirm_parameter_name(name, match): prompt = ("The parameter '{}' was not found!\n" " Did you mean '{}'?".format(name, match)) return cli.confirm(prompt, default=True)