Skip to content

Commit

Permalink
Changed command line argpasrse to process '--symmetric [True|False]'.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Feb 20, 2024
1 parent 1b48054 commit 5cb527e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ def process(self):

self.int4_quant_algo()

def ort_convert_str_to_bool(value):
return value.lower() in ("true", "1")

def parse_args():
parser = argparse.ArgumentParser(
Expand All @@ -366,7 +368,9 @@ def parse_args():
"--symmetric",
required=False,
default=True,
type=bool,
const=False,
nargs='?',
type=ort_convert_str_to_bool,
help="Indicate whether to quantize the model symmetrically",
)
parser.add_argument(
Expand Down

0 comments on commit 5cb527e

Please sign in to comment.