And I got an error:
UnexpectedStatusException: Error hosting endpoint roberta-LS-2020-03-16-09-48-47: Failed. Reason: The primary container for production variant AllTraffic did not pass the ping health check. Please check CloudWatch logs for this endpoint..
The error is in the file fast-bert/container/bert/predictor.py line 49. You need to modify the call to BertClassificationPredictor using a string instead of a PosixPath. It can be easily solved like this:
I am using version 1.6.4. After I trained my model with:
text_classifier = sagemaker.RealTimePredictor(endpoint=bt_model.endpoint_name, sagemaker_session=sagemaker_session, serializer=json.dumps, deserializer=sagemaker.predictor.json_deserializer)
And I got an error: UnexpectedStatusException: Error hosting endpoint roberta-LS-2020-03-16-09-48-47: Failed. Reason: The primary container for production variant AllTraffic did not pass the ping health check. Please check CloudWatch logs for this endpoint..
The error is in the file fast-bert/container/bert/predictor.py line 49. You need to modify the call to BertClassificationPredictor using a string instead of a PosixPath. It can be easily solved like this:
predictor = BertClassificationPredictor( str(PATH / "model_out"), label_path=PATH, multi_label=bool(model_config["multi_label"]), model_type=model_config["model_type"], do_lower_case=bool(model_config["do_lower_case"]), )
Thank you for your work!