From 50da7ac0978ff57bf54cc8d16df088b3732c7340 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 10 Oct 2024 20:34:56 +0100 Subject: [PATCH] Remove references to ML models --- extensions/ql-vscode/src/codeql-cli/cli.ts | 30 +--------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/extensions/ql-vscode/src/codeql-cli/cli.ts b/extensions/ql-vscode/src/codeql-cli/cli.ts index 431713152fa..8d782be9e89 100644 --- a/extensions/ql-vscode/src/codeql-cli/cli.ts +++ b/extensions/ql-vscode/src/codeql-cli/cli.ts @@ -3,7 +3,7 @@ import { spawn } from "child-process-promise"; import type { ChildProcessWithoutNullStreams } from "child_process"; import { spawn as spawnChildProcess } from "child_process"; import { readFile } from "fs-extra"; -import { delimiter, dirname, join } from "path"; +import { delimiter, join } from "path"; import type { Log } from "sarif"; import { SemVer } from "semver"; import type { Readable } from "stream"; @@ -91,15 +91,6 @@ export type QlpacksInfo = { [name: string]: string[] }; */ type LanguagesInfo = { [name: string]: string[] }; -/** Information about an ML model, as resolved by `codeql resolve ml-models`. */ -type MlModelInfo = { - checksum: string; - path: string; -}; - -/** The expected output of `codeql resolve ml-models`. */ -type MlModelsInfo = { models: MlModelInfo[] }; - /** Information about a data extension predicate, as resolved by `codeql resolve extensions`. */ type DataExtensionResult = { predicate: string; @@ -109,7 +100,6 @@ type DataExtensionResult = { /** The expected output of `codeql resolve extensions`. */ type ResolveExtensionsResult = { - models: MlModelInfo[]; data: { [path: string]: DataExtensionResult[]; }; @@ -1097,24 +1087,6 @@ export class CodeQLCliServer implements Disposable { ); } - /** Resolves the ML models that should be available when evaluating a query. */ - async resolveMlModels( - additionalPacks: string[], - queryPath: string, - ): Promise { - const args = - // use the dirname of the path so that we can handle query libraries - [...this.getAdditionalPacksArg(additionalPacks), dirname(queryPath)]; - return await this.runJsonCodeQlCliCommand( - ["resolve", "ml-models"], - args, - "Resolving ML models", - { - addFormat: false, - }, - ); - } - /** * Gets the RAM setting for the query server. * @param queryMemoryMb The maximum amount of RAM to use, in MB.