Merge pull request #3757 from github/henrymercer/remove-ml-models
Cleanup: Remove references to ML models
This commit is contained in:
@@ -3,7 +3,7 @@ import { spawn } from "child-process-promise";
|
|||||||
import type { ChildProcessWithoutNullStreams } from "child_process";
|
import type { ChildProcessWithoutNullStreams } from "child_process";
|
||||||
import { spawn as spawnChildProcess } from "child_process";
|
import { spawn as spawnChildProcess } from "child_process";
|
||||||
import { readFile } from "fs-extra";
|
import { readFile } from "fs-extra";
|
||||||
import { delimiter, dirname, join } from "path";
|
import { delimiter, join } from "path";
|
||||||
import type { Log } from "sarif";
|
import type { Log } from "sarif";
|
||||||
import { SemVer } from "semver";
|
import { SemVer } from "semver";
|
||||||
import type { Readable } from "stream";
|
import type { Readable } from "stream";
|
||||||
@@ -91,15 +91,6 @@ export type QlpacksInfo = { [name: string]: string[] };
|
|||||||
*/
|
*/
|
||||||
type LanguagesInfo = { [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`. */
|
/** Information about a data extension predicate, as resolved by `codeql resolve extensions`. */
|
||||||
type DataExtensionResult = {
|
type DataExtensionResult = {
|
||||||
predicate: string;
|
predicate: string;
|
||||||
@@ -109,7 +100,6 @@ type DataExtensionResult = {
|
|||||||
|
|
||||||
/** The expected output of `codeql resolve extensions`. */
|
/** The expected output of `codeql resolve extensions`. */
|
||||||
type ResolveExtensionsResult = {
|
type ResolveExtensionsResult = {
|
||||||
models: MlModelInfo[];
|
|
||||||
data: {
|
data: {
|
||||||
[path: string]: DataExtensionResult[];
|
[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<MlModelsInfo> {
|
|
||||||
const args =
|
|
||||||
// use the dirname of the path so that we can handle query libraries
|
|
||||||
[...this.getAdditionalPacksArg(additionalPacks), dirname(queryPath)];
|
|
||||||
return await this.runJsonCodeQlCliCommand<MlModelsInfo>(
|
|
||||||
["resolve", "ml-models"],
|
|
||||||
args,
|
|
||||||
"Resolving ML models",
|
|
||||||
{
|
|
||||||
addFormat: false,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the RAM setting for the query server.
|
* Gets the RAM setting for the query server.
|
||||||
* @param queryMemoryMb The maximum amount of RAM to use, in MB.
|
* @param queryMemoryMb The maximum amount of RAM to use, in MB.
|
||||||
|
|||||||
Reference in New Issue
Block a user