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
Python 3.12 xgboost.core.XGBoostError: Invalid Parameter format for nthread expect int but value='-1'
when DMatrix
used with import googlecloudprofiler
.
#10224
Comments
It's probably Python 3.12 with google profiler. I looked into it a little bit, loading the
My guess is that it's compiled with an incompatible compiler, which can be resolved by a source installation. I don't think I can go deeper than this at the moment. |
It would be interesting to see if the error persists after installing the identical set of packages in a Conda environment. (Conda packages use the same C++ compiler) |
the profiler is not on forge yet. Otherwise I would like to do a quick test. |
Hi again. I've tested for older lib versions we have used in Python 3.10. I have run:
I couldn't downgrade to Anyway, code surprisingly worked with cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
google-api-core==2.18.0
google-api-python-client==2.127.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-cloud-profiler==4.1.0
googleapis-common-protos==1.63.0
httplib2==0.22.0
idna==3.7
numpy==1.26.4
proto-plus==1.23.0
protobuf==4.25.3
pyasn1==0.6.0
pyasn1_modules==0.4.0
pyparsing==3.1.2
requests==2.31.0
rsa==4.9
scipy==1.13.0
uritemplate==4.1.1
urllib3==2.2.1
xgboost==1.7.4 I've also tested it for in-between versions of |
I suggest opening an issue for google cloud profiler to fix this first. ;-) |
It's still bad TBH. After downgrading I get another error later in the project code when initialized Traceback (most recent call last):
File "/project/path/file2.py", line 19, in <module>
main()
File "/project/path/file2.py", line 16, in main
model.predict(matrix)[0].item()
^^^^^^^^^^^^^^^^^^^^^
File "/venv/path/lib/python3.12/site-packages/xgboost/core.py", line 2163, in predict
_check_call(
File "/venv/path/lib/python3.12/site-packages/xgboost/core.py", line 279, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: Invalid Parameter format for disable_default_eval_metric expect boolean but value='' Again, the solution is to remove |
Hi
I have a very peculiar error which happened when I've updated versions of Python and libs in project I'm working on.
Minimal example to reproduce the case is this:
Python 3.12.2
Install with
Run with
Results in
To "solve" the problem remove
import googlecloudprofiler
fromfile.py
. I really have no idea why just importing the lib causes this problem; it would make more sense aftergooglecloudprofiler.start
is called.I'm also going to check and post if downgrading any of main requirements, which are
xgboost
andgoogle-cloud-profiler
, will fix this issue. Not today though; tired.The text was updated successfully, but these errors were encountered: