You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XGBoost 1.7 not working with .explain. Running the same deployment code with 1.6, however, does work. Since the "End of availability" date for <=1.6 is fast approaching (Nov 2024), I am wondering if this will be patched and/or if the availability date for 1.6 could be extended.
Steps to reproduce
Train an XGBoost classifier
Deploy it with feature explanations turned on to 1.7/1.6
1.6 will work, 1.7 will err with this message:
InvalidArgument: 400 {"error": "b'{\"detail\":\"Unsupported content type of the request: application/x-www-form-urlencoded.\\\\nCurrently supported content-type in DefaultSerializer: \\\\\"application/json\\\\\".\"}'"}
Code example to reproduce error
fromgoogle.cloudimportaiplatformfromgoogle.cloud.aiplatform_v1.typesimportSampledShapleyAttributionfromgoogle.cloud.aiplatform_v1.types.explanationimportExplanationParametersexp_metadata=aiplatform.explain.ExplanationMetadata(
inputs={"features": {}},
outputs={"score": {}},
)
exp_parameters=ExplanationParameters(
sampled_shapley_attribution=SampledShapleyAttribution(path_count=5)
)
# Register modelmodel=aiplatform.Model.upload(
display_name=model_display_name,
artifact_uri=f'gs://{bucket_name}/model',
serving_container_image_uri='us-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.1-7:latest', # swap 1-7 for 1-6 to test differenceexplanation_metadata=exp_metadata,
explanation_parameters=exp_parameters,
)
# Deploy model to endpointendpoint=aiplatform.Endpoint.create(
display_name=display_name
)
model.deploy(
endpoint=endpoint,
deployed_model_display_name=deployed_model_display_name,
machine_type='n1-standard-2',
min_replica_count=1,
max_replica_count=2,
)
The text was updated successfully, but these errors were encountered:
Environment details
https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers#xgboost
XGBoost 1.7 not working with .explain. Running the same deployment code with 1.6, however, does work. Since the "End of availability" date for <=1.6 is fast approaching (Nov 2024), I am wondering if this will be patched and/or if the availability date for 1.6 could be extended.
Steps to reproduce
Code example to reproduce error
The text was updated successfully, but these errors were encountered: