Xgboost: amalgamation/../dmlc-core/src/io/local_filesys.cc:61: LocalFileSystem.GetPathInfo Error:No such file or directory

Created on 18 Aug 2016  路  12Comments  路  Source: dmlc/xgboost

dfull <- xgb.DMatrix(as.matrix(xg.M), label=xg.Y, missing=NaN)
Error in xgb.DMatrix(as.matrix(xg.M), label = xg.Y, missing = NaN) :
[21:47:15] amalgamation/../dmlc-core/src/io/local_filesys.cc:61: LocalFileSystem.GetPathInfo 0.16388082504 Error:No such file or directory

Im getting interesting error. Tried with same dataset on different machines with same xgboost version. This is the first time it happened to me.
Any clues what it could be?

xgboost installed from source
install hash: c529cac6ff5e5d9a3affb3d14af66d46537c5fd6
using R on win10

Edit:
found out the culprit - there was character column in dataset (int64 converted to character);

Interesting error nonetheless

Most helpful comment

double check if you have provided all numeric type features to xgb.DMatrix function. Hope it helps

All 12 comments

Agree. More explicit error would be helpful. Thanks, raddar!

Is it resolved? I am getting the same error as following
"amalgamation/../dmlc-core/src/io/local_filesys.cc:86: LocalFileSystem.ListDirectory 3/10 error: No such file or directory"

double check if you have provided all numeric type features to xgb.DMatrix function. Hope it helps

@fakyras suggestion corrected the problem for me... user error (doh) :) Agree with @dmi3kno that a more explicit error would be helpful.

Seems was due to the fact that xgboost recognize some of it as string and think it is a path. @khotilov @hetong007 maybe a better input type recognition code?

I've added a simple check in #2045 to print out, hopefully, a more clear error message.

Can you please explain how to "double check if you have provided all numeric type features to xgb.DMatrix function"

@theastyanax You should call str(dataframe) and check each variables type is of numeric (eg: not factor). XGBoost won't work with categorical (factor) variables.

Running xgboost on https://www.kaggle.com/dalpozz/creditcardfraud also returns this error. I have made sure that all the variable types are numeric.

Try data.matrix(yourdata) inside DMatrix() instead of as.matrix(yourdata), it works on me.

@harryprince Can you make a more concrete proposal for generating better error message? Let's open a new issue so that we can keep track of it.

I face up the same issue like this:https://github.com/dmlc/xgboost/issues/1480#issuecomment-277605373

pass a matrix contains string into DMatrix(), but the error seems thrown by C++/C directly.

I am using xgboost and sparklyr::spark_apply to inference results.

Was this page helpful?
0 / 5 - 0 ratings