deep_autoviml
deep_autoviml copied to clipboard
predict function
if I'm loading the model from another instance. Can I use the predict function or since my model is a multiclass BERT model do I need to use predict_text? Sorry if this is a very basic question as I'm new to this.
I tried loading the model like this:
from deep_autoviml import deep_autoviml as deepauto
model_or_model_path = './Bert_tag_Classifier_IS/BERT/model_2022_02_12-20_44_53'
project_name='Bert_tag_Classifier_IS'
test = df
keras_model_type = 'BERT'
predictions = deepauto.predict(model_or_model_path,
project_name,
test_dataset =test,
keras_model_type = keras_model_type)
and keep getting this error;
File "C:\Users\yanie\anaconda3\envs\Deep_autoviml_env\lib\site-packages\deep_autoviml\modeling\predict_model.py", line 311, in predict model, cat_vocab_dict = load_model_dict(model_or_model_path, cat_vocab_dict, project_name, keras_model_type)
TypeError: cannot unpack non-iterable NoneType object
any thoughts on this?
Hi @BenGraWarBuf 👍 Have you gone to this folder:
model_or_model_path = './Bert_tag_Classifier_IS/BERT/model_2022_02_12-20_44_53'
and actually checked if the model and artifacts (cat_vocab_dict) are there? Then please post a screen shot of the folder here. Look at mine here.
https://ibb.co/tMbcGfb
Then we can do some digging AutoViML
hi,
Yes, my folder looks exactly like yours.
please see below:

and this is how my artifacts folder looks:

Hi @BenGraWarBuf 👍 In that case, can you post a link to a Colab or GitHub where a snippet of data that you are feeding is shown? I am not sure where the problem is. Thanks AutoViML