From 61e5429f0002a96fb4fa4ed0786e0a7a164a91a9 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Mon, 14 Mar 2022 12:16:09 +0530 Subject: [PATCH] revert testing changes --- .../MachineLearning/MLFileDebugView.tsx | 1 - src/components/MachineLearning/MlDebug.tsx | 39 ++++++++++++++++++- src/constants/machineLearning/config.ts | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/components/MachineLearning/MLFileDebugView.tsx b/src/components/MachineLearning/MLFileDebugView.tsx index 9c41b3846..7234bf604 100644 --- a/src/components/MachineLearning/MLFileDebugView.tsx +++ b/src/components/MachineLearning/MLFileDebugView.tsx @@ -88,7 +88,6 @@ export default function MLFileDebugView(props: MLFileDebugViewProps) { const loadFile = async () => { // TODO: go through worker for these apis, to not include ml code in main bundle const imageBitmap = await createImageBitmap(props.file); - console.log(imageBitmap); const faceDetections = await blazeFaceDetectionService.detectFaces( imageBitmap ); diff --git a/src/components/MachineLearning/MlDebug.tsx b/src/components/MachineLearning/MlDebug.tsx index 1931237bb..754c1b721 100644 --- a/src/components/MachineLearning/MlDebug.tsx +++ b/src/components/MachineLearning/MlDebug.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import React, { useState, useEffect, useContext, ChangeEvent } from 'react'; import { getData, LS_KEYS } from 'utils/storage/localStorage'; import { useRouter } from 'next/router'; @@ -486,6 +485,44 @@ export default function MLDebug() {
+ Hdbscan MST: +
+ {mstD3Tree && ( + + renderForeignObjectNode({ + ...rd3tProps, + foreignObjectProps, + }) + } + /> + )} +
+ +
+ TSNE of embeddings: + +
+ {mlResult.tsne && } +
+
); } diff --git a/src/constants/machineLearning/config.ts b/src/constants/machineLearning/config.ts index 393a83beb..9d25755bf 100644 --- a/src/constants/machineLearning/config.ts +++ b/src/constants/machineLearning/config.ts @@ -2,7 +2,7 @@ import { JobConfig } from 'types/common/job'; import { MLSearchConfig, MLSyncConfig } from 'types/machineLearning'; export const DEFAULT_ML_SYNC_JOB_CONFIG: JobConfig = { - intervalSec: 1, + intervalSec: 30, // TODO: finalize this after seeing effects on and from machine sleep maxItervalSec: 960, backoffMultiplier: 2,