Tested your code and got meaningful results:
>>> xgboost.__version__ '3.0.1' >>> sklearn.__version__ '1.6.1'