Job
This class encapsulates and extends the ROS resource type ALIYUN::PAIDLC::Job
, which is used to create a Machine Learning Platform for AI (PAI) job to run in a cluster.
Initializers
import com.aliyun.ros.cdk.paidlc.Job;
Job.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.displayName(java.lang.String)
.displayName(IResolvable)
.jobSpecs(IResolvable)
.jobSpecs(java.util.List<IResolvable)
.jobSpecs(JobSpecsProperty>)
.jobType(java.lang.String)
.jobType(IResolvable)
.userCommand(java.lang.String)
.userCommand(IResolvable)
.workspaceId(java.lang.String)
.workspaceId(IResolvable)
// .codeSource(IResolvable)
// .codeSource(CodeSourceProperty)
// .dataSources(IResolvable)
// .dataSources(java.util.List<IResolvable)
// .dataSources(DataSourcesProperty>)
// .envs(java.lang.String)
// .envs(IResolvable)
// .jobMaxRunningTimeMinutes(java.lang.Number)
// .jobMaxRunningTimeMinutes(IResolvable)
// .options(java.lang.String)
// .options(IResolvable)
// .priority(java.lang.Number)
// .priority(IResolvable)
// .resourceId(java.lang.String)
// .resourceId(IResolvable)
// .settings(IResolvable)
// .settings(java.util.Map<java.lang.String, java.lang.Object>)
// .successPolicy(java.lang.String)
// .successPolicy(IResolvable)
// .thirdpartyLibDir(java.lang.String)
// .thirdpartyLibDir(IResolvable)
// .thirdpartyLibs(IResolvable)
// .thirdpartyLibs(java.util.List<java.lang.String)
// .thirdpartyLibs(IResolvable>)
// .userVpc(IResolvable)
// .userVpc(UserVpcProperty)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
displayName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property displayName: The name of the task is as follows: The name length does not exceed 256 characters. |
jobSpecs |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property jobSpecs: Jobspecs describes various configurations of tasks during the mission, such as mirror address, start command, node resource statement, number of copies, etc. |
jobType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property jobType: The type of job. |
userCommand |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property userCommand: Start commands of all nodes in the task. |
workspaceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property workspaceId: Work space ID, how to get working space ID, see listworkSpaces. |
codeSource |
com.aliyun.ros.cdk.core.IResolvable OR CodeSourceProperty |
Property codeSource: The code source used in this task.Before the mission node starts, the DLC will automatically download the code configured in the code source, and mount to the local directory of the container. |
dataSources |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property dataSources: List of data source used for task operation. |
envs |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property envs: Environment variable configuration. |
jobMaxRunningTimeMinutes |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property jobMaxRunningTimeMinutes: The longest running time is running, and the unit is minutes. |
options |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property options: The additional configuration of this task can adjust some of the behavior of the mounting data source through this parameter.If the task has a data source that mounted the OSS type, you can cover the default parameters of the jinofs by configure the configuration of this parameter to fs.OSS.DOWNLOAD.CONCURRENCY = 4, fs.oss.download.queue.size = 16. |
priority |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property priority: The priority of the task, optional parameter, default value 1, the range of parameter values is 1 ~ 9.in: 1 is the minimum priority. 9 is the highest priority. |
resourceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceId: Resource group ID, optional parameter. |
settings |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property settings: Job settings. |
successPolicy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property successPolicy: The successful strategy of distributed multi -machine tasks is currently only supported by TensorFlow's multi -machine task. |
thirdpartyLibDir |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property thirdpartyLibDir: The name folder of the Requirements.txt file is located; before each node runs the specified usercommand, PAI -DLC will take the requirements.txt file from the specified folder and call the PIP Install -R installation. |
thirdpartyLibs |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property thirdpartyLibs: Python third-party library list to be installed. |
userVpc |
com.aliyun.ros.cdk.core.IResolvable OR UserVpcProperty |
Property userVpc: User VPC configuration. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
displayName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property displayName: The name of the task is as follows: The name length does not exceed 256 characters.
Allow numbers, letters, lower strokes (_), English period (.) And short horizontal lines (-).
jobSpecs
Required
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
JobSpecsProperty>
Property jobSpecs: Jobspecs describes various configurations of tasks during the mission, such as mirror address, start command, node resource statement, number of copies, etc.
The DLC task consists of different types of nodes. The same type of nodes have exactly the same configuration. This configuration is called a Jobspec. Jobspecs describes the configuration of all types of nodes and is the array of Jobspec.
jobType
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property jobType: The type of job.
Values: TFJob, PyTorchJob, XGBoostJob, OneFlowJob, ElasticBatch
userCommand
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property userCommand: Start commands of all nodes in the task.
workspaceId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property workspaceId: Work space ID, how to get working space ID, see listworkSpaces.
codeSource
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CodeSourceProperty
Property codeSource: The code source used in this task.Before the mission node starts, the DLC will automatically download the code configured in the code source, and mount to the local directory of the container.
dataSources
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
DataSourcesProperty>
Property dataSources: List of data source used for task operation.
envs
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property envs: Environment variable configuration.
jobMaxRunningTimeMinutes
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property jobMaxRunningTimeMinutes: The longest running time is running, and the unit is minutes.
options
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property options: The additional configuration of this task can adjust some of the behavior of the mounting data source through this parameter.If the task has a data source that mounted the OSS type, you can cover the default parameters of the jinofs by configure the configuration of this parameter to fs.OSS.DOWNLOAD.CONCURRENCY = 4, fs.oss.download.queue.size = 16.
priority
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property priority: The priority of the task, optional parameter, default value 1, the range of parameter values is 1 ~ 9.in: 1 is the minimum priority. 9 is the highest priority.
resourceId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceId: Resource group ID, optional parameter.
The parameter value is empty indicating that submitted to the public resource group. If the current working space has been bound to a proprietary resource group, you can specify the corresponding resource group ID here; how to create a proprietary resource group and inquire about the proprietary resource group ID, please refer to the preparation and management of the DLC resource group cluster.
settings
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property settings: Job settings.
successPolicy
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property successPolicy: The successful strategy of distributed multi -machine tasks is currently only supported by TensorFlow's multi -machine task.
ChiefWorker: When it is specified as this value, as long as the Chief's POD is successful, it is considered that the entire task is successful. All workers: All workers must be successful to think that the entire task is successful.
thirdpartyLibDir
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property thirdpartyLibDir: The name folder of the Requirements.txt file is located; before each node runs the specified usercommand, PAI -DLC will take the requirements.txt file from the specified folder and call the PIP Install -R installation.
thirdpartyLibs
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property thirdpartyLibs: Python third-party library list to be installed.
userVpc
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR UserVpcProperty
Property userVpc: User VPC configuration.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.paidlc.Job;
Job.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrJobId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute JobId: The task ID created this time. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrJobId
Required
public IResolvable getAttrJobId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute JobId: The task ID created this time.