mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
allow overriding kcpps values with explicit args
This commit is contained in:
parent
55a249d222
commit
4b6a12e9c0
1 changed files with 6 additions and 1 deletions
|
@ -3746,8 +3746,13 @@ def load_config_cli(filename):
|
||||||
with open(filename, 'r') as f:
|
with open(filename, 'r') as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
args.istemplate = False
|
args.istemplate = False
|
||||||
|
raw_args = (sys.argv[1:]) #a lousy hack to allow for overriding kcpps
|
||||||
for key, value in config.items():
|
for key, value in config.items():
|
||||||
setattr(args, key, value)
|
if f"--{key}" in raw_args:
|
||||||
|
if key!="config":
|
||||||
|
print(f"Overriding Config Value: {key}")
|
||||||
|
else:
|
||||||
|
setattr(args, key, value)
|
||||||
if args.istemplate:
|
if args.istemplate:
|
||||||
print("\nA .kcppt template was selected from CLI - automatically selecting your backend...")
|
print("\nA .kcppt template was selected from CLI - automatically selecting your backend...")
|
||||||
auto_set_backend_cli()
|
auto_set_backend_cli()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue