Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] exception thrown for requests to NSFW model #69

Open
peterlitvak opened this issue Dec 22, 2021 · 0 comments
Open

[BUG] exception thrown for requests to NSFW model #69

peterlitvak opened this issue Dec 22, 2021 · 0 comments

Comments

@peterlitvak
Copy link

peterlitvak commented Dec 22, 2021

Our tests started failing with requests to NSFW model with the following:

clarifai2.exception.ClarifaiException: Deserialization of UNKNOWN is not implemented
	at clarifai2.dto.model.output.ClarifaiOutput.deserializePredictions(ClarifaiOutput.java:120)
	at clarifai2.dto.model.output.ClarifaiOutput.deserialize(ClarifaiOutput.java:56)
	at clarifai2.api.request.model.PredictRequest$1.unmarshalerGrpc(PredictRequest.java:166)
	at clarifai2.api.request.model.PredictRequest$1.unmarshalerGrpc(PredictRequest.java:114)
	at clarifai2.api.request.ClarifaiRequest$Impl.executeSync(ClarifaiRequest.java:310)
	at clarifai2.api.request.ClarifaiRequest$Builder.executeSync(ClarifaiRequest.java:211)

We are using the following Clarifai client:

<dependency>
    <groupId>com.clarifai.clarifai-api2</groupId>
    <artifactId>core</artifactId>
    <version>2.8.1</version>
</dependency>

This happens in response to the following call:

clarifaiClient
    .getDefaultModels()
    .nsfwModel()
    .predict()
    .withInputs(images.stream().map(ClarifaiInput::forImage).collect(Collectors.toList()))
    .executeSync();

The response JSON comes as valid, however the model/output_info section seems to be empty:

"model": {
        "id": "e9576d86d2004ed1a38ba0cf39ecb4b1",
        "name": "nsfw-v1.0",
        "createdAt": "2016-09-17T22:18:59.955626Z",
        "appId": "main",
        "outputInfo": {
          "outputConfig": {
          },
          "message": "Show output_info with: GET /models/{model_id}/output_info"
        },
        "modelVersion": {
          "id": "aa47919c9a8d4d94bfa283121281bcc4",
          "createdAt": "2018-01-23T19:25:09.618692Z",
          "status": {
            "code": "MODEL_TRAINED",
            "description": "Model is trained and ready"
          }
        },
        "displayName": "nsfw-v1-visual-classifier"
      }

Which causes the above exception during parcing.

This started happening 12/20/2021 before that everything was working fine.

@peterlitvak peterlitvak changed the title exception thrown for requests to NSFW model [BUG] exception thrown for requests to NSFW model Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant