MLOps C4_W1 Optional: Build, train, and deploy an XGBoost model on Cloud AI Platform

Hi, I have done upto Step 6 and wanted to execute model.fit(x_train, y_train) but facing error for the line #10, see screenshot below:

Appreciate someone’s kind help.

Hello @BHTan
What does the final part of the error suggest?

Hi Isaak, thanks for reaching out on my query. The final part of the error suggested:
ImportError: cannot import name ‘Int64Index’ from ‘pandas’ (/opt/conda/lib/python3.10/site-packages/pandas/init.py)

Below is a snippet of the errors:

Hi Isaak, I managed to resolve the problem. The source of the problem were with the incompatibility of the versions of pandas and xgboost. I updated both modules to the latest version 2 and resolved the problem.

Warm regards,
Bruce

1 Like