[Frontend] [Neuron] Parse literals out of override-neuron-config (#8959)

Co-authored-by: Jerzy Zagorski <jzagorsk@amazon.com>
This commit is contained in:
xendo
2024-10-03 20:02:07 +02:00
committed by GitHub
parent f5d72b2fc6
commit 63e39937f9
2 changed files with 37 additions and 20 deletions

View File

@@ -800,13 +800,10 @@ class EngineArgs:
"lower performance.")
parser.add_argument(
'--override-neuron-config',
type=lambda configs: {
str(key): value
for key, value in
(config.split(':') for config in configs.split(','))
},
type=json.loads,
default=None,
help="override or set neuron device configuration.")
help="Override or set neuron device configuration. "
"e.g. {\"cast_logits_dtype\": \"bloat16\"}.'")
parser.add_argument(
'--scheduling-policy',