-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
MachineLearningTrialComponent.cs
69 lines (62 loc) · 4.55 KB
/
MachineLearningTrialComponent.cs
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.MachineLearning.Models
{
/// <summary> Trial component definition. </summary>
public partial class MachineLearningTrialComponent
{
/// <summary> Initializes a new instance of <see cref="MachineLearningTrialComponent"/>. </summary>
/// <param name="command"> [Required] The command to execute on startup of the job. eg. "python train.py". </param>
/// <param name="environmentId"> [Required] The ARM resource ID of the Environment specification for the job. </param>
/// <exception cref="ArgumentNullException"> <paramref name="command"/> or <paramref name="environmentId"/> is null. </exception>
public MachineLearningTrialComponent(string command, ResourceIdentifier environmentId)
{
Argument.AssertNotNull(command, nameof(command));
Argument.AssertNotNull(environmentId, nameof(environmentId));
Command = command;
EnvironmentId = environmentId;
EnvironmentVariables = new ChangeTrackingDictionary<string, string>();
}
/// <summary> Initializes a new instance of <see cref="MachineLearningTrialComponent"/>. </summary>
/// <param name="codeId"> ARM resource ID of the code asset. </param>
/// <param name="command"> [Required] The command to execute on startup of the job. eg. "python train.py". </param>
/// <param name="distribution">
/// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
/// Please note <see cref="MachineLearningDistributionConfiguration"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="MpiDistributionConfiguration"/>, <see cref="PyTorchDistributionConfiguration"/>, <see cref="RayDistributionConfiguration"/> and <see cref="TensorFlowDistributionConfiguration"/>.
/// </param>
/// <param name="environmentId"> [Required] The ARM resource ID of the Environment specification for the job. </param>
/// <param name="environmentVariables"> Environment variables included in the job. </param>
/// <param name="resources"> Compute Resource configuration for the job. </param>
internal MachineLearningTrialComponent(ResourceIdentifier codeId, string command, MachineLearningDistributionConfiguration distribution, ResourceIdentifier environmentId, IDictionary<string, string> environmentVariables, MachineLearningJobResourceConfiguration resources)
{
CodeId = codeId;
Command = command;
Distribution = distribution;
EnvironmentId = environmentId;
EnvironmentVariables = environmentVariables;
Resources = resources;
}
/// <summary> ARM resource ID of the code asset. </summary>
public ResourceIdentifier CodeId { get; set; }
/// <summary> [Required] The command to execute on startup of the job. eg. "python train.py". </summary>
public string Command { get; set; }
/// <summary>
/// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
/// Please note <see cref="MachineLearningDistributionConfiguration"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="MpiDistributionConfiguration"/>, <see cref="PyTorchDistributionConfiguration"/>, <see cref="RayDistributionConfiguration"/> and <see cref="TensorFlowDistributionConfiguration"/>.
/// </summary>
public MachineLearningDistributionConfiguration Distribution { get; set; }
/// <summary> [Required] The ARM resource ID of the Environment specification for the job. </summary>
public ResourceIdentifier EnvironmentId { get; set; }
/// <summary> Environment variables included in the job. </summary>
public IDictionary<string, string> EnvironmentVariables { get; set; }
/// <summary> Compute Resource configuration for the job. </summary>
public MachineLearningJobResourceConfiguration Resources { get; set; }
}
}