trialConfig.ts 942 Bytes
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
3
4
5
6
7
8

/**
 * Trial job configuration class
 * Representing trial job configurable properties
 */
export class TrialConfig {
9
    // Trail command
chicm-ms's avatar
chicm-ms committed
10
    public readonly command: string;
11

12
    // Code directory
chicm-ms's avatar
chicm-ms committed
13
    public readonly codeDir: string;
14

15
    // Required GPU number for trial job. The number should be in [0,100]
chicm-ms's avatar
chicm-ms committed
16
    public readonly gpuNum: number;
17

18
19
20
21
    // this flag uses for UT now.
    // in future, all environments should be reusable, and this can be configurable by user.
    public reuseEnvironment: boolean | undefined = true;

22
23
24
25
26
27
    /**
     * Constructor
     * @param command Trail command
     * @param codeDir Code directory
     * @param gpuNum Required GPU number for trial job
     */
chicm-ms's avatar
chicm-ms committed
28
    constructor(command: string, codeDir: string, gpuNum: number) {
29
30
31
32
        this.command = command;
        this.codeDir = codeDir;
        this.gpuNum = gpuNum;
    }
33
}