Skip to content

Commit 343a923

Browse files
authored
fix bug (#2864)
1 parent fed16df commit 343a923

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/runtime/xgboost/evaluate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sklearn.metrics
1616
import xgboost as xgb
1717
from runtime import db
18+
from runtime.dbapi.paiio import PaiIOConnection
1819
from runtime.xgboost.dataset import xgb_dataset
1920

2021
SKLEARN_METRICS = [
@@ -58,7 +59,7 @@ def evaluate(datasource,
5859
if not is_pai:
5960
conn = db.connect_with_data_source(datasource)
6061
else:
61-
conn = None
62+
conn = PaiIOConnection.from_table(pai_table)
6263
dpred = xgb_dataset(datasource,
6364
'predict.txt',
6465
select,

0 commit comments

Comments
 (0)