Restore developability

This commit is contained in:
Manav Rathi
2024-07-19 09:27:06 +05:30
parent 51f1a88c21
commit b07d82ebc2
2 changed files with 6 additions and 4 deletions

View File

@@ -46,7 +46,9 @@ import { type RemoteFaceIndex } from "./face";
* all the derived data associated with a file.
*/
// TODO-ML: Fix name to "combined" before release
type EmbeddingModel = "xxxx-xxxx" /* Combined format */;
const wipModelName = process.env.NEXT_PUBLIC_ENTE_ENABLE_WIP_ML_DONT_USE ?? "";
// type EmbeddingModel = "xxxx-xxxx" /* Combined format */;
type EmbeddingModel = string; // "xxxx-xxxx" /* Combined format */;
const RemoteEmbedding = z.object({
/** The ID of the file whose embedding this is. */
@@ -200,7 +202,7 @@ export const fetchDerivedData = async (
filesByID: Map<number, EnteFile>,
): Promise<Map<number, RemoteDerivedData>> => {
// TODO-ML: Fix name to "combined" before release
const remoteEmbeddings = await fetchEmbeddings("xxxx-xxxx", [
const remoteEmbeddings = await fetchEmbeddings(wipModelName, [
...filesByID.keys(),
]);
@@ -296,7 +298,7 @@ export const putDerivedData = async (
// TODO-ML: Fix name to "combined" before release
putEmbedding(
enteFile,
"xxxx-xxxx",
wipModelName,
await gzip(JSON.stringify(derivedData)),
);

View File

@@ -99,7 +99,7 @@ export const terminateMLWorker = () => {
*/
// TODO-ML:
export const isMLSupported =
isDesktop && process.env.NEXT_PUBLIC_ENTE_ENABLE_WIP_ML;
isDesktop && process.env.NEXT_PUBLIC_ENTE_ENABLE_WIP_ML_DONT_USE;
/**
* Was this someone who might've enabled the beta ML? If so, show them the