[Breaking] Require format to be specified in input URI. (#9077)
Previously, we use `libsvm` as default when format is not specified. However, the dmlc data parser is not particularly robust against errors, and the most common type of error is undefined format. Along with which, we will recommend users to use other data loader instead. We will continue the maintenance of the parsers as it's currently used for many internal tests including federated learning.
This commit is contained in:
@@ -46,8 +46,8 @@ class TestSHAP:
|
||||
fscores = bst.get_fscore()
|
||||
assert scores1 == fscores
|
||||
|
||||
dtrain = xgb.DMatrix(dpath + 'agaricus.txt.train')
|
||||
dtest = xgb.DMatrix(dpath + 'agaricus.txt.test')
|
||||
dtrain = xgb.DMatrix(dpath + 'agaricus.txt.train?format=libsvm')
|
||||
dtest = xgb.DMatrix(dpath + 'agaricus.txt.test?format=libsvm')
|
||||
|
||||
def fn(max_depth, num_rounds):
|
||||
# train
|
||||
|
||||
Reference in New Issue
Block a user