mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-23 07:49:04 +00:00
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:
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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user