Closed jrfackler closed 1 year ago
I am going to close this issue. I have been using the non-stable version of tsai for a long time without issue but all of a sudden the error above started to occur. I don't know the cause but when I switched to the stable version of tsai it works as expected again. I will just use the stable version.
Hi @jrfackler, I've reopened this issue since it's something I'd like to investigate a bit further. Bear in mind that the latest version will become the stable version when I make a new pip release, which will happen soon. And I don't want to make it if there's a known issue like this. Could you provide a code snippet to reproduce this issue? I've tried it, but couldn't reproduce it.
Hi @oguiza,
I just emailed you a code snippet and the data files to reproduce the issue. Please let me know if you need anything else. Thanks!
Hi @oguiza,
Did you just update the stable version? It is causes that same error for me now. This there a way I could use the older version? Thanks.
Hi @jrfackler, I created a new pip release (0.3.4) this morning, which is probably the reason why you see the issue again. I'm sorry I've been busy this week. I expect to have some more time next week. I'll look into the issue and try to fix it. In the meantime, you can just use:
pip install tsai==0.3.2
Thank you very much @oguiza! That version is working perfectly for me.
Are you ok if I close this issue? The code snippet and data you sent to me do not reproduce this issue, but one with load_learner.
@oguiza, thank you very much for looking at this issue. This does seem to be caused by learn.export and the different versions of tsai so I think it okay to close the issue.
What I have found is that if I train the model again with the new version of tsai, then learn.export and load_learner work fine.
But, if I have an already trained model that used tsai version 0.3.2 then load_learner does not work with the new version of tsai and that model.
For already trained models, pip install tsai==0.3.2 works fine for load_learner.
I will also try the learn.save and learn.load method from the blog article for new training models.
Thanks again!
This happens to me. A model exported with learn.export
in environment A is used to make predictions with learn = load_learner(PATH, cpu=False)
and learn.get_X_preds(x_test,y_test)
in environment B. Environment A is synced with https://github.com/timeseriesAI/tsai/commit/b075bfad924ab62a2e3f96594b77a42ac71ff136, while environment B is with https://github.com/timeseriesAI/tsai/commit/07aa6db6e38f5c7ab1791197cfd91e5d832f7eb2. But if I run the code that exports the model in environment B. The error does not exist.
Hello,
When I try to do inference on the validation set:
input1 = learn1.get_X_preds(X_valid)
I now get:
TypeError: only integer scalar arrays can be converted to a scalar index
2 days ago it worked fine so something seems to have changed. I have tried it on 2 different machines with the same result.
Does anyone have any ideas?
my_setup()