Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Revert "setting a safe fallback for when there is no upper limit"
Browse files Browse the repository at this point in the history
This reverts commit 6a748bd.
  • Loading branch information
yyassi-heartex committed Nov 20, 2023
1 parent 6a748bd commit f51cf82
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/stores/DataStores/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { CustomJSON } from "../types";
import { FF_DEV_2536, FF_LOPS_E_3, isFF } from "../../utils/feature-flags";

const SIMILARITY_UPPER_LIMIT_PRECISION = 1000;
const SIMILARITY_UPPER_LIMIT = 10;
const fileAttributes = types.model({
"certainty": types.optional(types.maybeNull(types.number), 0),
"distance": types.optional(types.maybeNull(types.number), 0),
Expand Down Expand Up @@ -221,14 +220,13 @@ export const create = (columns) => {

postProcessData(data) {
const { total_annotations, total_predictions, similarity_score_upper_limit } = data;
const similarityUpperLimit = similarity_score_upper_limit ?? SIMILARITY_UPPER_LIMIT;

if (total_annotations !== null)
self.totalAnnotations = total_annotations;
if (total_predictions !== null)
self.totalPredictions = total_predictions;
if (similarity_score_upper_limit !== null)
self.similarityUpperLimit = (Math.ceil(similarityUpperLimit * SIMILARITY_UPPER_LIMIT_PRECISION) / SIMILARITY_UPPER_LIMIT_PRECISION);
self.similarityUpperLimit = (Math.ceil(similarity_score_upper_limit * SIMILARITY_UPPER_LIMIT_PRECISION) / SIMILARITY_UPPER_LIMIT_PRECISION);
},

}))
Expand Down

0 comments on commit f51cf82

Please sign in to comment.