Completed series of patches to loom metamodel integration with Bayeslite.
A summary of the applied patches is below:
initialize_models performs a sql update instead of dropping and adding models
analyze_models performs a sql update instead of dropping and adding models
predictive_relevance raises a BQL error if hypotheticals are provided
fixed the loom_store_path so that it is no longer hardcoded and instead matches the default loom project directory
analyze_models takes num_iterations and passes it as the extra_passes parameter to loom when calling loom.tasks.infer
modified both analyze_models drop_models so that specific model numbers can't be specified since loom can't handle per-model operations
reset the model count to 0 when drop_models is called
remove the samples folder in the loom data directory when drop_models is called to ensure that future analyses will have a fresh start instead of picking up where the old analyses left off (also added functionality to close the preql and q_server objects when deleting them from the cache in drop_models to prevent a race condition in the loom data directory)
modified the row_similarity function so that it accounts for context
modified the way the loom metamodel handles categorical types so that if a categorical variable has more than 256 distinct types it is treated as the loom type unboundedcategorical
Tested these patches in bayeslite/tests/test_loom_metamodel.py.
Completed series of patches to loom metamodel integration with Bayeslite.
A summary of the applied patches is below:
Tested these patches in bayeslite/tests/test_loom_metamodel.py.