case class TrainingContext(batchIndex: Int, sharedStateSingleton: SharedSingleton[SharedState], schema: StructType, numCols: Int, numInitScoreClasses: Int, trainingParams: BaseTrainParams, networkParams: NetworkParams, columnParams: ColumnParams, datasetParams: String, featureNames: Option[Array[String]], numTasksPerExecutor: Int, validationData: Option[Broadcast[Array[Row]]], serializedReferenceDataset: Option[Array[Byte]], partitionCounts: Option[Array[Long]]) extends Serializable with Product
Object to encapsulate all information about a training session that does not change during execution and can be created on the driver. There is also a reference to the shared state in an executor, which can change over time.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- TrainingContext
- Product
- Equals
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new TrainingContext(batchIndex: Int, sharedStateSingleton: SharedSingleton[SharedState], schema: StructType, numCols: Int, numInitScoreClasses: Int, trainingParams: BaseTrainParams, networkParams: NetworkParams, columnParams: ColumnParams, datasetParams: String, featureNames: Option[Array[String]], numTasksPerExecutor: Int, validationData: Option[Broadcast[Array[Row]]], serializedReferenceDataset: Option[Array[Byte]], partitionCounts: Option[Array[Long]])
Value Members
- val batchIndex: Int
- val columnParams: ColumnParams
- val datasetParams: String
- val earlyStoppingRound: Int
- val featureNames: Option[Array[String]]
- val hasGroups: Boolean
- val hasGroupsAsInt: Int
- val hasInitialScores: Boolean
- val hasInitialScoresAsInt: Int
- val hasValidationData: Boolean
- val hasWeights: Boolean
- val hasWeightsAsInt: Int
- val improvementTolerance: Double
- def incrementArrayProcessedSignal(log: Logger): Int
- def incrementDataPrepDoneSignal(log: Logger): Unit
- val isBulk: Boolean
- val isClassification: Boolean
- val isProvideTrainingMetric: Boolean
- val isStreaming: Boolean
- val microBatchSize: Int
- val networkParams: NetworkParams
- val numCols: Int
- val numInitScoreClasses: Int
- val numTasksPerExecutor: Int
- val partitionCounts: Option[Array[Long]]
- val schema: StructType
- val serializedReferenceDataset: Option[Array[Byte]]
- def sharedState(): SharedState
- val sharedStateSingleton: SharedSingleton[SharedState]
-
def
shouldCreateValidationDataset(): Boolean
Determines if the current task should calculate the validation Dataset.
Determines if the current task should calculate the validation Dataset. Only 1 task per executor needs to do it, and first one to call this gets the assignment.
- returns
True if the current task should create, false otherwise.
- implicit def toInt(b: Boolean): Int
- val trainingParams: BaseTrainParams
- val useSingleDatasetMode: Boolean
- val validationData: Option[Broadcast[Array[Row]]]