dlcConfig.ts 1.12 KB
Newer Older
1
2
3
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

4
import { TrialConfig } from 'training_service/common/trialConfig';
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
import { EnvironmentInformation } from '../environment';
import { DlcClient } from '../dlc/dlcClient';

export class DlcClusterConfig {
    public readonly type: string;
    public readonly image: string;
    public readonly podCount: number;
    public readonly ecsSpec: string;

    constructor(type: string, image: string, podCount: number, ecsSpec: string) {
        this.type = type;
        this.image = image;
        this.podCount = podCount;
        this.ecsSpec = ecsSpec;
    }
}

export class DlcTrialConfig extends TrialConfig {
    public readonly image: string;
    public readonly command: string;
    public readonly codeDir: string;

    constructor(codeDir: string, command: string, image: string) {
        super("", codeDir, 0);
        this.codeDir = codeDir;
        this.command = command;
        this.image = image;
    }
}

export class DlcEnvironmentInformation extends EnvironmentInformation {
    public dlcClient?: DlcClient;
    public currentMessageIndex: number = -1;
}