Main: Log auth and sampler overrides after model load
Like YALS, logging all pertinent information after model load makes it easier to parse by the user. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
parent
54b8a20a19
commit
0646d358a2
1 changed files with 13 additions and 13 deletions
26
main.py
26
main.py
|
|
@ -46,19 +46,6 @@ async def entrypoint_async():
|
||||||
|
|
||||||
port = fallback_port
|
port = fallback_port
|
||||||
|
|
||||||
# Initialize auth keys
|
|
||||||
await load_auth_keys(config.network.disable_auth)
|
|
||||||
|
|
||||||
gen_logging.broadcast_status()
|
|
||||||
|
|
||||||
# Set sampler parameter overrides if provided
|
|
||||||
sampling_override_preset = config.sampling.override_preset
|
|
||||||
if sampling_override_preset:
|
|
||||||
try:
|
|
||||||
await sampling.overrides_from_file(sampling_override_preset)
|
|
||||||
except FileNotFoundError as e:
|
|
||||||
logger.warning(str(e))
|
|
||||||
|
|
||||||
# If an initial model name is specified, create a container
|
# If an initial model name is specified, create a container
|
||||||
# and load the model
|
# and load the model
|
||||||
model_name = config.model.model_name
|
model_name = config.model.model_name
|
||||||
|
|
@ -96,6 +83,19 @@ async def entrypoint_async():
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
logger.error(ex.msg)
|
logger.error(ex.msg)
|
||||||
|
|
||||||
|
# Initialize auth keys
|
||||||
|
await load_auth_keys(config.network.disable_auth)
|
||||||
|
|
||||||
|
gen_logging.broadcast_status()
|
||||||
|
|
||||||
|
# Set sampler parameter overrides if provided
|
||||||
|
sampling_override_preset = config.sampling.override_preset
|
||||||
|
if sampling_override_preset:
|
||||||
|
try:
|
||||||
|
await sampling.overrides_from_file(sampling_override_preset)
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
logger.warning(str(e))
|
||||||
|
|
||||||
await start_api(host, port)
|
await start_api(host, port)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue