Error in Sagemaker clarify processing job for the explainability monitoring job

0

hi, I have issue while running sagemaker explainability monitoring job , I'm running into below error when i run explainabilty baseline job

Customer Error: cannot reshape array of size 2062 into shape (2073,newaxis)

/usr/local/lib/python3.9/site-packages/analyzer/predictor.py:521: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. return np.array(predicted_labels, dtype=self._prediction_dtype).reshape(data.shape[0], -1)

please let me know how should i be able to resolve the issue

Regards, Yashaswi

demandé il y a un an350 vues
1 réponse
0

It's hard to tell exactly what is causing the error without a stacktrace, or more information on the inputs. That VisibleDeprecationWarning may not necessarily be where the error is occurring, but you may be able to tell from the stacktrace yourself if it is.

If the error is from that warning, the code

np.array(predicted_labels, dtype=self._prediction_dtype).reshape(data.shape[0], -1)

looks like it's expecting the predicted_labels to have the same number of records of data (which is the request we sent to the model). This may mean if we sent N records to your model, but according to your analysis configuration, when we extract the predicted labels from your model output, the number of labels is different than N.

We use label and probability parameters under predictor in the Analysis Configuration to extract those predicted labels/scores. Your label config may be resulting in that "ragged nested sequences" the warning is talking about.

Please check to make sure your model + analysis config ensures there is only one predicted label per record and label is producing what you expect

profile pictureAWS
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions