deep_autoviml icon indicating copy to clipboard operation
deep_autoviml copied to clipboard

predict function

Open BenGraWarBuf opened this issue 3 years ago • 3 comments

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?

BenGraWarBuf avatar Feb 13 '22 18:02 BenGraWarBuf

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

AutoViML avatar Feb 15 '22 13:02 AutoViML

hi,

Yes, my folder looks exactly like yours.

please see below: image

and this is how my artifacts folder looks: image

BenGraWarBuf avatar Feb 16 '22 14:02 BenGraWarBuf

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

AutoViML avatar Feb 18 '22 13:02 AutoViML