Skip to content
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

is_categorical_dtype(dtype) errors from xgboost #9672

Closed
mlauronen opened this issue Oct 13, 2023 · 2 comments
Closed

is_categorical_dtype(dtype) errors from xgboost #9672

mlauronen opened this issue Oct 13, 2023 · 2 comments

Comments

@mlauronen
Copy link

I am using stable xgboost 2.0 in Python 3.9 and getting deprecation future and user warnings from

  • xgboost/data.py
  • xgboost/core.py

/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:335: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check isinstance(dtype, pd.SparseDtype) instead.
if is_sparse(dtype):
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:338: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
is_categorical_dtype(dtype) or is_pa_ext_categorical_dtype(dtype)
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:384: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
if is_categorical_dtype(dtype):
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:359: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
return is_int or is_bool or is_float or is_categorical_dtype(dtype)
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:520: FutureWrning: is_sparse is deprecated and will be removed in a future version. Check isinstance(dtype, pd.SparseDtype) instead.
if is_sparse(data):
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/core.py:160: UserWarning: [15:48:59] WARNING: /workspace/src/objective/regression_obj.cu:209: reg:linear is now deprecated in favor of reg:squarederror.
warnings.warn(smsg, UserWarning)
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:335: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check isinstance(dtype, pd.SparseDtype) instead.
if is_sparse(dtype):
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:338: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
is_categorical_dtype(dtype) or is_pa_ext_categorical_dtype(dtype)
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:384: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
if is_categorical_dtype(dtype):
/home/mika/Data/Trading/devel/tests/keras/.venv/lib/python3.9/site-packages/xgboost/data.py:359: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
return is_int or is_bool or is_float or is_categorical_dtype(dtype)


@hcho3
Copy link
Collaborator

hcho3 commented Oct 13, 2023

We are working on patch release 2.0.1 that will fix the warning. Stay tuned

@trivialfis
Copy link
Member

This has been fixed by #9557 , we will make a new patch release once the build issue on macos is sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants