All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.neptunedata.model.CustomModelTrainingParameters.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.neptunedata.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains custom model training parameters. See [Custom models in Neptune ML](https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-custom-models.html).
 */
public class CustomModelTrainingParameters private constructor(builder: Builder) {
    /**
     * The path to the Amazon S3 location where the Python module implementing your model is located. This must point to a valid existing Amazon S3 location that contains, at a minimum, a training script, a transform script, and a `model-hpo-configuration.json` file.
     */
    public val sourceS3DirectoryPath: kotlin.String = requireNotNull(builder.sourceS3DirectoryPath) { "A non-null value must be provided for sourceS3DirectoryPath" }
    /**
     * The name of the entry point in your module of a script that performs model training and takes hyperparameters as command-line arguments, including fixed hyperparameters. The default is `training.py`.
     */
    public val trainingEntryPointScript: kotlin.String? = builder.trainingEntryPointScript
    /**
     * The name of the entry point in your module of a script that should be run after the best model from the hyperparameter search has been identified, to compute the model artifacts necessary for model deployment. It should be able to run with no command-line arguments.The default is `transform.py`.
     */
    public val transformEntryPointScript: kotlin.String? = builder.transformEntryPointScript

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.neptunedata.model.CustomModelTrainingParameters = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CustomModelTrainingParameters(")
        append("sourceS3DirectoryPath=$sourceS3DirectoryPath,")
        append("trainingEntryPointScript=$trainingEntryPointScript,")
        append("transformEntryPointScript=$transformEntryPointScript")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sourceS3DirectoryPath.hashCode()
        result = 31 * result + (trainingEntryPointScript?.hashCode() ?: 0)
        result = 31 * result + (transformEntryPointScript?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as CustomModelTrainingParameters

        if (sourceS3DirectoryPath != other.sourceS3DirectoryPath) return false
        if (trainingEntryPointScript != other.trainingEntryPointScript) return false
        if (transformEntryPointScript != other.transformEntryPointScript) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.neptunedata.model.CustomModelTrainingParameters = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The path to the Amazon S3 location where the Python module implementing your model is located. This must point to a valid existing Amazon S3 location that contains, at a minimum, a training script, a transform script, and a `model-hpo-configuration.json` file.
         */
        public var sourceS3DirectoryPath: kotlin.String? = null
        /**
         * The name of the entry point in your module of a script that performs model training and takes hyperparameters as command-line arguments, including fixed hyperparameters. The default is `training.py`.
         */
        public var trainingEntryPointScript: kotlin.String? = null
        /**
         * The name of the entry point in your module of a script that should be run after the best model from the hyperparameter search has been identified, to compute the model artifacts necessary for model deployment. It should be able to run with no command-line arguments.The default is `transform.py`.
         */
        public var transformEntryPointScript: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.CustomModelTrainingParameters) : this() {
            this.sourceS3DirectoryPath = x.sourceS3DirectoryPath
            this.trainingEntryPointScript = x.trainingEntryPointScript
            this.transformEntryPointScript = x.transformEntryPointScript
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.neptunedata.model.CustomModelTrainingParameters = CustomModelTrainingParameters(this)

        internal fun correctErrors(): Builder {
            if (sourceS3DirectoryPath == null) sourceS3DirectoryPath = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy