-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C API does not return error on invalid parameters #8659
Comments
given how stable it is (is it?) I wonder if we can just hard code it |
It would be quite difficult to hard code if you want accurate report. Currently there's a warning for invalid parameters. I kept it as warning since there are lots of users just dump the parameters into tuning libraries, flipping it to error will upset quite some people ... |
Ah, ok, this is my fault then. Somehow I'm not picking up warnings, I'll have to look into the documentation to see what I should be doing. |
Apologies, I forgot to mention there's a parameter called xgboost/include/xgboost/context.h Line 38 in 72ec0c5
You need to set it to true to enable it. (Set it just like any other training parameters) |
Ah! I'm so happy now, I'm definitely going to enable this by default in XGBoost.jl. |
Glad that it's useful. Feel free to close the issue if the warning message is sufficient. |
Ok, PR is up here. It's not ideal: in particular, as with all other output from inside libxgboost, we can't run the warnings through the Julia logger, meaning that these warnings will ignore logging settings. I'm also a little wary about messing around with default parameter values, but I think enough of us have found this issue sufficiently annoying that we can make an exception. Anyway, thanks for your help. |
Currently libxgboost does not error if invalid parameter names are passed, which can lead to some confusion. As far as I can tell, there are no good options for obtaining a list of valid parameter names: either I can get it from the documentation page or source code, but in either case maintenance is very difficult and, worse, may not even match up perfectly with versions of the underlying library unless I am very careful.
It seems to me that ideally the C API should error when invalid parameters are passed, as it is much harder to validate them at the wrapper level.
Alternatively, if the C API provided a list of parameter names, the wrappers could more easily check for invalid parameter names.
The text was updated successfully, but these errors were encountered: