Closed fsaad closed 7 years ago
The bulk of the work for this ticket has been implemented in 4d6e0ce176538f5c5c939e8fbcd5438d116a0667
We still need to implement these stubs https://github.com/probcomp/bayeslite/blob/master/src/bql.py#L845-L851 although those are now separate smaller tickets.
All aggregation over cgpms in a metamodel should be implemented by the BQL interpreter. The interface for
IBayesDBMetmaodel
should thus return a list of answers, rather than a single answer. This interface allows us toESTIMATE ... FROM <pop>
with only minor modification, migrating the aggregation logic over a models of a generator intobqlfn.py
(in a similar way thatbqlfn.py
current aggregates over metamodels in a population).SIMULATE <bql> FROM MODELS OF <pop>
which we cannot do currently because theUSING MODEL
support has been removed. Even if we hadUSING MODEL
we would be obliged to run the queries row-by-row in the SQL style, rather than use multiprocessing over gpms.Tasks:
cgpm_metamodel
to pass through the list of results fromengine
to their caller.crosscat
to pass through a singleton list of results, since the interface of lovecat does notmetamodel.method
(found using grep, typically inbqlfn
) to aggregate appropriately over the returned lists, rather than assume a float has been returned.