-
Notifications
You must be signed in to change notification settings - Fork 64
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
BayesDB unpredictably forgets a model learned with the Loom backend #591
Comments
@versar Loom is designed to store auxiliary data files for each generator on disk ; these files are separate from the .bdb file and are stored in the bayeslite/src/metamodels/loom_metamodel.py Lines 125 to 130 in 0d80bf2
The stack traces you pasted, in particular the error: It is possible that your client code, e.g. ipython notebook, has a relative path for
The reason that ESTIMATE DEPENDENCE and ESTIMATE SIMILARITY do not have an error is that the data structures needed to answer these queries live in the .bdb file, so we do not need to resort to the Loom-specific directories (which are needed for analyze and simulate). If you have a reproducible state and continue to experience issues, then I can help you debug further. |
@fsaad Thanks for the suggestions. If I am understanding correctly that
then I am using an absolute path for |
On multiple occasions, I have built a CrossCat model from some data using the Loom backend, then successfully performed a variety of queries. Suddenly, I experience an error where bayeslite seems to forget that the model has been trained using
ANALYZE
. Errors occur when I attempt to perform some commands (likeSIMULATE
and moreANALYZE
) but not others (likeESTIMATE DEPENDENCE
andESTIMATE SIMILARITY
). This is quite frustrating, especially afterANALYZE
was already run for a long time and the CrossCat model looked fine on multiple queries. The only effective solution when I have encountered this bug has been to delete the .bdb file and start from scratch.Error with ANALYZE
To demonstrate that the generator exists for the purpose of this issue report, I tried
%mml INITIALIZE 16 MODELS FOR <generator>
. In the notebook I was using,<generator> = 'glove_loom'
. As expected when the generator exists, I get the errorGenerator 'glove_loom' already has models: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
. I had already been working with this .bdb file for multiple days using a number of different queries, after training the generator on a large data set usingANALYZE
.When I tried
ANALYZE
after verifying that the generator exists as above, I got an error. The command I tried was%mml ANALYZE "glove_loom" FOR 30 ITERATION WAIT;
and it failed. The stack trace outputted to the notebook cell is attached here.stack_trace_ANALZYE.txt
Error with SIMULATE
I tried the command
%bql SIMULATE <variable> FROM <population> LIMIT 1
. This returned an error message'NoneType' object has no attribute '_predict'
. Note: this SIMULATE query is the first time in my workflow that I noticed this set of errors. I attached here a stack trace from performing the same SIMULATE query through the bayeslite api asbdb.execute('SIMULATE <variable> FROM <population> LIMIT 1').fetchall()
. In this case,<variable> = 'glove_vector_90'
and<population> = 'glove'
. This is in the same notebook producing the ANALYZE error above.stack_trace_simulate.txt
No error with ESTIMATE DEPENDENCE
In the same notebook producing the errors above, the following works as expected:
ESTIMATE DEPENDENCE PROBABILITY FROM PAIRWISE VARIABLES OF glove MODELED BY glove_loom
No error with ESTIMATE SIMILARITY
In the same notebook producing the errors above, the following works as expected:
ESTIMATE SIMILARITY IN THE CONTEXT OF "glove_vector_247" FROM PAIRWISE glove MODELED BY glove_loom
The text was updated successfully, but these errors were encountered: