-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbaseInference.ts
More file actions
40 lines (37 loc) · 1005 Bytes
/
baseInference.ts
File metadata and controls
40 lines (37 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { StringDict } from "@/parsing/index.js";
import { InferenceModel } from "./inferenceModel.js";
import { InferenceFile } from "./inferenceFile.js";
import { InferenceJob } from "./inferenceJob.js";
export abstract class BaseInference {
/**
* Model info for the inference.
*/
public model: InferenceModel;
/**
* Job the inference belongs to.
*/
public job: InferenceJob;
/**
* File info for the inference.
*/
public file: InferenceFile;
/**
* ID of the inference.
*/
public id: string;
protected constructor(serverResponse: StringDict) {
this.id = serverResponse["id"];
this.job = new InferenceJob(serverResponse["job"]);
this.model = new InferenceModel(serverResponse["model"]);
this.file = new InferenceFile(serverResponse["file"]);
}
toString(): string {
return (
"Inference\n" +
"#########\n" +
this.job.toString() + "\n" +
this.model.toString() + "\n" +
this.file.toString() + "\n"
);
}
}