When CONFIG_FILES setting is not used, the caikit-nlp config values are not read from environment variables unless caikit has already imported caikit-nlp. The code was loading the embedding config too soon in this case so the env vars were ignored.
This commit reads the config during bootstrap and load for settings that are needed at bootstrap/load time and also reads config during module init for runtime settings.
In addition:
bootstrap() kwargs can be used (e.g. for trust_remote_code param)
load() was made to work with model_path as ModuleConfig (because str is deprecated and spammy)
utils/env_val_to_int was removed because the caikit config handles this well
utils/env_val_to_bool was NOT YET removed because the caikit config does not handle this quite as well
When CONFIG_FILES setting is not used, the caikit-nlp config values are not read from environment variables unless caikit has already imported caikit-nlp. The code was loading the embedding config too soon in this case so the env vars were ignored.
This commit reads the config during bootstrap and load for settings that are needed at bootstrap/load time and also reads config during module init for runtime settings.
In addition: