"configs/minkunet/metafile.yml" did not exist on "20987e5f030fb52ae248f0f598bf4c0ab994e5b0"
amlConfig.ts 1.46 KB
Newer Older
SparkSnail's avatar
SparkSnail committed
1
2
3
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

4
import { TrialConfig } from 'training_service/common/trialConfig';
SparkSnail's avatar
SparkSnail committed
5
6
7
8
9
10
11
import { EnvironmentInformation } from '../environment';
import { AMLClient } from '../aml/amlClient';

export class AMLClusterConfig {
    public readonly subscriptionId: string;
    public readonly resourceGroup: string;
    public readonly workspaceName: string;
12
13
14
    public readonly computeTarget: string;
    public useActiveGpu?: boolean;
    public maxTrialNumPerGpu?: number;
SparkSnail's avatar
SparkSnail committed
15

16
17
    constructor(subscriptionId: string, resourceGroup: string, workspaceName: string, computeTarget: string,
                useActiveGpu?: boolean, maxTrialNumPerGpu?: number) {
SparkSnail's avatar
SparkSnail committed
18
19
20
        this.subscriptionId = subscriptionId;
        this.resourceGroup = resourceGroup;
        this.workspaceName = workspaceName;
21
22
23
        this.computeTarget = computeTarget;
        this.useActiveGpu = useActiveGpu;
        this.maxTrialNumPerGpu = maxTrialNumPerGpu;
SparkSnail's avatar
SparkSnail committed
24
25
26
27
28
29
30
31
    }
}

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

32
    constructor(codeDir: string, command: string, image: string) {
SparkSnail's avatar
SparkSnail committed
33
34
35
36
37
38
39
40
41
        super("", codeDir, 0);
        this.codeDir = codeDir;
        this.command = command;
        this.image = image;
    }
}

export class AMLEnvironmentInformation extends EnvironmentInformation {
    public amlClient?: AMLClient;
SparkSnail's avatar
SparkSnail committed
42
    public currentMessageIndex: number = -1;
SparkSnail's avatar
SparkSnail committed
43
}