Element <ml-train>¶
Purpose: Train and publish a configured machine-learning artifact from project data.
Why: Use it to train and publish a configured model artifact from project-owned data.
Example¶
1 | |
Decision guide¶
Business value: Produces a versioned tabular model artifact for use cases that require learned distributions.
-
Use when
- A governed project explicitly requires model training from an owned dataset.
-
Choose another approach when
- Deterministic rules or registered generators can express the required data contract.
-
Prerequisites
- Provide an authorized source, privacy exclusions, resource bounds, and the ML test profile.
-
Alternatives
- Use deterministic generation when business rules define the required values. (See:
<generate>)
- Use deterministic generation when business rules define the required values. (See:
Complete examples¶
Train a bounded tabular model and consume it through ml://
Use ml-train only when a named source dataset, privacy exclusions, and bounded training policy are explicit requirements of the model.
| ml-training/data/customers.ent.csv | |
|---|---|
1 2 3 4 5 6 | |
| ml-training/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
Rules and invalid combinations¶
W004 — Deprecated XML Attribute Ignored
<{element}> attribute '{attribute}' in descriptor '{descriptor}' is deprecated and ignored; execution continues. {migration}
Why: The descriptor uses a known legacy attribute that no longer controls execution.
Resolution: Follow the migration hint when updating the model. Removing the attribute is not required to run it.
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, setup, while
Allowed children:
None
Attributes¶
Show all 35 attributes
analyzeDropColumns
Columns to drop during analyze stage.
optional; string; Default: null.
analyzeValueProtection
Enable analysis for value protection.
optional; boolean; Default: null.
batchSize
Batch size for training.
optional; integer; Default: null.
contextSource
Optional relational context source for two-table training.
optional; string; Default: null.
contextType
Type of the relational context.
optional; string; Default: null.
ctxPrimaryKey
Primary key column(s) in context; supports composite.
optional; string; Default: null.
device
Computation device selector passed to the ML engine.
optional; string; Default: null.
differentialPrivacy
Differential privacy configuration (JSON).
optional; string; Default: null.
encodingTypes
Per-column encoding overrides.
optional; string; Default: null; Values: AUTO, TABULAR_CATEGORICAL, TABULAR_NUMERIC_AUTO, TABULAR_NUMERIC_DISCRETE, TABULAR_NUMERIC_BINNED, TABULAR_NUMERIC_DIGIT, TABULAR_CHARACTER, TABULAR_DATETIME, TABULAR_DATETIME_RELATIVE, TABULAR_LAT_LONG, LANGUAGE_TEXT, LANGUAGE_CATEGORICAL, LANGUAGE_NUMERIC, LANGUAGE_DATETIME.
fairness
Fairness configuration (JSON).
optional; string; Default: null.
flexibleGeneration
Enable flexible generation mode.
optional; boolean; Default: null.
generationBatchSize
Batch size during generation.
optional; integer; Default: null.
gradientAccumulationSteps
Steps for gradient accumulation.
optional; integer; Default: null.
imputation
Imputation configuration (JSON).
optional; string; Default: null.
maxEpochs
Maximum number of training epochs.
optional; number; Default: null.
maxSequenceWindow
Maximum sequence window size.
optional; integer; Default: null.
maxTrainingTime
Maximum training time in minutes.
optional; string; Default: null.
mode
Deprecated: accepted with a warning and ignored. This setting does not control training or persistence.
optional; string; Default: null.
modelStateStrategy
Strategy for managing model state.
optional; string; Default: null; Values: reset, resume, reuse.
modelType
Model type/preset used by the engine.
optional; string; Default: null; Values: TABULAR, LANGUAGE.
name
Name of the ML model.
required; string.
rareCategoryReplacementMethod
Method for handling rare categories.
optional; string; Default: null; Values: constant, sample.
rebalancing
Class/feature rebalancing configuration (JSON).
optional; string; Default: null.
samplingTemperature
Sampling temperature used for generation (0-2).
optional; number; Default: null.
samplingTopP
Top-p (nucleus) sampling threshold (0-1).
optional; number; Default: null.
sensitiveColumns
Columns to drop for privacy (comma-separated).
optional; string; Default: null.
separator
Separator for generated data.
optional; string; Default: null.
source
Training data source: a project file or configured source identifier.
required; string.
splitPartitions
Number of partitions for dataset split.
optional; integer; Default: null.
targetColumn
Target column for supervised training.
optional; string; Default: null.
tgtContextKey
Join key(s) linking target to context; supports composite.
optional; string; Default: null.
tgtPrimaryKey
Primary key column(s) in target; supports composite.
optional; string; Default: null.
trainModel
Training model identifier or preset.
optional; string; Default: null.
trainValSplit
Train/validation split ratio (0-1).
optional; number; Default: null.
type
Type of data to train on.
optional; string; Default: null.