Bot-Detector-Core-Files icon indicating copy to clipboard operation
Bot-Detector-Core-Files copied to clipboard

Attempt to Create Prediction if One Doesn't Exist

Open ThorntonMatthewD opened this issue 4 years ago • 3 comments

  1. Check if prediction exists
  2. Ask ML repo app to make one via remote request
  3. If it can't create a prediction (no data on the account or whatever else) return a "blank" prediction so that the plugin doesn't freak out.

Blank prediction format:

predict_dict = {
                "player_id": -1,
                "player_name": player_name,
                "prediction_label": "Prediction not in database",
                "prediction_confidence": 0
            }

ThorntonMatthewD avatar Nov 21 '21 22:11 ThorntonMatthewD

is the issue that we are not handling the "blank" prediction?

extreme4all avatar Nov 23 '21 09:11 extreme4all

Originally. That has been fixed in the legacy routes, but remains an issue in GET /v1/prediction.

ThorntonMatthewD avatar Nov 23 '21 13:11 ThorntonMatthewD

ah, nice catch!

the story would be as a user i don't want to see an api error if the user is not in the database

extreme4all avatar Nov 23 '21 23:11 extreme4all