I had some problem with pre-trained model which have been saved by joblib.
I wrote a source code of model in a file, named sam_model.py, which contains only class and function of the model. Then i created a new .py file to train this model and save it with path: model/sam_model.pkl.
This is the problem:
When I created one more new file, named test_load_model.py, at the same folder with model.py, then loaded the model, it run.
But when i changed the folder of test_load_model.py, it can not run.
Anyone help me!
This is my tree:
image about how my folder look like
The code of 2 file like this:
import joblib
model = joblib.load('E:/Subject/University/Data_Mining_And_Analysis/data_mining_project/model/sam_model.pkl')
print(model.predictFromComment('Almost good, but the wheel is so bad, it stopped just 2 months after buying.'))
I did push this model to Kaggle model and try to import it to run, but it can not either.