-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The TextGeneration ModuleBases raises exception when loading weights from a path #248
Comments
I put together a possible fix for this in VassilisVassiliadis#1. Would you like me to move the PR here ? |
Hi! The message you're seeing is a You're absolutely correct that the "right" way to do this will be to make |
Thank you Gabe, I was looking at the logs and started chasing down that warning message without first checking if the model ended up loading first! I can confirm that caikit-nlp did load the model and I was able to send inference requests to it. Is there a way I can query the runtime to get back a list of loaded models? Or maybe look for something in the logs of the caikit runtime to figure out which model was loaded? For example, I searched for
Is it safe to assume that if the Caikit Runtime attempts to load a model it will either:
|
Currently, no, there is not, but there is a feature request to add this and we're actively investigating what it would take
You can look for the log code |
Describe the bug
When using
artifact_path
to load weights from a path with one of the text_generation ModuleBases the caikit runtime emits the following error:The source of the exception is
os.path.join
incaikit-nlp/caikit_nlp/modules/text_generation/text_generation_local.py
Line 471 in 4f42230
model_path
is a ModuleConfig object instead of astr
.Platform
Please provide details about the environment you are using, including the following:
Sample Code
Create the files
/tmp/test/runtime_config.yml
and/tmp/test/local_models_dir/text_generation/config.yml
like so:File
/tmp/test/runtime_config.yml
File
/tmp/test/local_models_dir/text_generation/config.yml
Download the weights of https://huggingface.co/google/flan-t5-base under
/tmp/test/google-flan-t5-base
Then run:
Expected behavior
The
TextGeneration
ModuleBase intext_generation_local.py
should successfully load the weights.Observed behavior
The LocalModelManager is unable to trigger the loading of the weights using the
TextGeneration
ModuleBase. The terminal shows the following message:Additional context
I think the fix is to expect a
Union[str, ModuleConfig]
for themodel_path
argument of theModuleBase.load()
methods.The text was updated successfully, but these errors were encountered: