Closed kihyuk-nam closed 2 years ago
INPUT
SELECT SUM(order_dow) FROM orders
RESULT
2022-08-24 14:09:58,714 [INFO ] ESTIMATE Aggregations: SELECT SUM(order_dow) FROM orders 2022-08-24 14:09:58,714 [INFO ] - Query: SELECT SUM(order_dow) FROM orders , Model: ['model/instances/ensemble_single_instacart_10000000.pkl'] 2022-08-24 14:09:58,715 [INFO ] - Show Confidence Intervals: True 2022-08-24 14:09:58,715 [INFO ] Read the ensemble in ['model/instances/ensemble_single_instacart_10000000.pkl'] 2022-08-24 14:09:58,717 [DEBUG] - Including SPN with table_set {'orders'} with sampling ratio(3421084 / 9853060.949424399) 2022-08-24 14:09:58,717 [DEBUG] Stats: (---Structure Statistics--- # nodes 63 # sum nodes 0 # prod nodes 19 # leaf nodes 42 # params 42 # edges 43 # layers 5) 2022-08-24 14:09:58,718 [INFO ] : <train.ensemble_compilation.spn_ensemble.SPNEnsemble object at 0x7fde78e0f970> 2022-08-24 14:09:58,720 [INFO ] Evaluate 'SELECT SUM(order_dow) FROM orders :<train.ensemble_compilation.graph_representation.Query object at 0x7fde78e0faf0>' 2022-08-24 14:09:58,720 [DEBUG] In evaluate_query 2022-08-24 14:09:58,720 [DEBUG] query.query_type = QueryType.AQP 2022-08-24 14:09:58,721 [DEBUG] predicted cardinality: 9853060.949424399 2022-08-24 14:09:58,721 [DEBUG] computed prototypical cardinality in 0.0009669910650700331 secs. 2022-08-24 14:09:58,721 [DEBUG] if len(query.group_bys) == 0 and confidence_intervals 2022-08-24 14:09:58,722 [DEBUG] query.query_type = QueryType.AQP 2022-08-24 14:09:58,722 [DEBUG] aggregation_operation_type = AggregationOperationType.AGGREGATION 2022-08-24 14:09:58,722 [DEBUG] aggregation_type = AggregationType.SUM 2022-08-24 14:09:58,722 [DEBUG] factors = [('orders', 'order_dow')] 2022-08-24 14:09:58,722 [DEBUG] expectation_spn: <train.aqp_spn.aqp_spn.AQPSPN object at 0x7fde78e0fac0> 2022-08-24 14:09:58,722 [DEBUG] expectation: * E(orders.order_dow| orders.orders_nn IS NOT NULL) INFO: 127.0.0.1:34034 - "GET /estimate/?query=SELECT%20SUM%28order_dow%29%20FROM%20orders%20&dataset=instacart&ensemble_location=model%2Finstances%2Fensemble_single_instacart_10000000.pkl&show_confidence_intervals=true HTTP/1.1" 500 Internal Server Error ... File "main.py", line 53, in aqp_read value = estimate(schema, dataset, query, ensemble_location, show_confidence_intervals) File "main.py", line 211, in estimate result = evaluate_an_aqp_query(ensemble_location, query, schema, show_confidence_intervals) File "/home/nam/Projects/traindb/traindb-ml/evaluation/aqp_evaluation.py", line 111, in evaluate_an_aqp_query spn_ensemble.evaluate_query(query, File "/home/nam/Projects/traindb/traindb-ml/train/ensemble_compilation/spn_ensemble.py", line 890, in evaluate_query current_stds, aggregation_result = expectation_spn.evaluate_expectation_batch( File "/home/nam/Projects/traindb/traindb-ml/train/aqp_spn/aqp_spn.py", line 161, in evaluate_expectation_batch self._normalized_conditional_expectation(features, inverted_features=inverted_features, File "/home/nam/Projects/traindb/traindb-ml/rspn/rspn.py", line 320, in _normalized_conditional_expectation return self._unnormalized_conditional_expectation_with_std(feature_scope, File "/home/nam/Projects/traindb/traindb-ml/rspn/rspn.py", line 282, in _unnormalized_conditional_expectation_with_std e_x_sq = self._indicator_expectation(feature_scope, File "/home/nam/Projects/traindb/traindb-ml/rspn/rspn.py", line 183, in _indicator_expectation full_result = expectation(self.mspn, feature_scope, inverted_features, range_conditions, File "/home/nam/Projects/traindb/traindb-ml/rspn/algorithms/expectations.py", line 64, in expectation [[expectation_recursive(spn, feature_scope, inverted_features, relevant_scope, evidence, File "/home/nam/Projects/traindb/traindb-ml/rspn/algorithms/expectations.py", line 146, in expectation_recursive llchildren = [expectation_recursive(child, feature_scope, inverted_features, relevant_scope, evidence, File "/home/nam/Projects/traindb/traindb-ml/rspn/algorithms/expectations.py", line 146, in <listcomp> llchildren = [expectation_recursive(child, feature_scope, inverted_features, relevant_scope, evidence, File "/home/nam/Projects/traindb/traindb-ml/rspn/algorithms/expectations.py", line 137, in expectation_recursive factor = expectation_recursive(child, feature_scope, inverted_features, relevant_scope, evidence, File "/home/nam/Projects/traindb/traindb-ml/rspn/algorithms/expectations.py", line 170, in expectation_recursive raise Exception('Node type unknown: ' + str(t_node)) Exception: Node type unknown: <class 'rspn.structure.leaves.Categorical'>
SUSPECTED CAUSE
INPUT
RESULT
SUSPECTED CAUSE