{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.HyperParameterTrainingJobDefinition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.HyperParameterTrainingJobDefinition where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.Channel
import Amazonka.SageMaker.Types.CheckpointConfig
import Amazonka.SageMaker.Types.HyperParameterAlgorithmSpecification
import Amazonka.SageMaker.Types.HyperParameterTuningJobObjective
import Amazonka.SageMaker.Types.OutputDataConfig
import Amazonka.SageMaker.Types.ParameterRanges
import Amazonka.SageMaker.Types.ResourceConfig
import Amazonka.SageMaker.Types.RetryStrategy
import Amazonka.SageMaker.Types.StoppingCondition
import Amazonka.SageMaker.Types.VpcConfig

-- | Defines the training jobs launched by a hyperparameter tuning job.
--
-- /See:/ 'newHyperParameterTrainingJobDefinition' smart constructor.
data HyperParameterTrainingJobDefinition = HyperParameterTrainingJobDefinition'
  { HyperParameterTrainingJobDefinition
-> Maybe HyperParameterTuningJobObjective
tuningObjective :: Prelude.Maybe HyperParameterTuningJobObjective,
    HyperParameterTrainingJobDefinition -> Maybe CheckpointConfig
checkpointConfig :: Prelude.Maybe CheckpointConfig,
    HyperParameterTrainingJobDefinition -> Maybe ParameterRanges
hyperParameterRanges :: Prelude.Maybe ParameterRanges,
    -- | The number of times to retry the job when the job fails due to an
    -- @InternalServerError@.
    HyperParameterTrainingJobDefinition -> Maybe RetryStrategy
retryStrategy :: Prelude.Maybe RetryStrategy,
    -- | Isolates the training container. No inbound or outbound network calls
    -- can be made, except for calls between peers within a training cluster
    -- for distributed training. If network isolation is used for training jobs
    -- that are configured to use a VPC, Amazon SageMaker downloads and uploads
    -- customer data and model artifacts through the specified VPC, but the
    -- training container does not have network access.
    HyperParameterTrainingJobDefinition -> Maybe Bool
enableNetworkIsolation :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the values of hyperparameters that do not change for the
    -- tuning job.
    HyperParameterTrainingJobDefinition -> Maybe (HashMap Text Text)
staticHyperParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A Boolean indicating whether managed spot training is enabled (@True@)
    -- or not (@False@).
    HyperParameterTrainingJobDefinition -> Maybe Bool
enableManagedSpotTraining :: Prelude.Maybe Prelude.Bool,
    -- | An array of Channel objects that specify the input for the training jobs
    -- that the tuning job launches.
    HyperParameterTrainingJobDefinition -> Maybe (NonEmpty Channel)
inputDataConfig :: Prelude.Maybe (Prelude.NonEmpty Channel),
    -- | The VpcConfig object that specifies the VPC that you want the training
    -- jobs that this hyperparameter tuning job launches to connect to. Control
    -- access to and from your training container by configuring the VPC. For
    -- more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html Protect Training Jobs by Using an Amazon Virtual Private Cloud>.
    HyperParameterTrainingJobDefinition -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The job definition name.
    HyperParameterTrainingJobDefinition -> Maybe Text
definitionName :: Prelude.Maybe Prelude.Text,
    -- | To encrypt all communications between ML compute instances in
    -- distributed training, choose @True@. Encryption provides greater
    -- security for distributed training, but training might take longer. How
    -- long it takes depends on the amount of communication between compute
    -- instances, especially if you use a deep learning algorithm in
    -- distributed training.
    HyperParameterTrainingJobDefinition -> Maybe Bool
enableInterContainerTrafficEncryption :: Prelude.Maybe Prelude.Bool,
    -- | The HyperParameterAlgorithmSpecification object that specifies the
    -- resource algorithm to use for the training jobs that the tuning job
    -- launches.
    HyperParameterTrainingJobDefinition
-> HyperParameterAlgorithmSpecification
algorithmSpecification :: HyperParameterAlgorithmSpecification,
    -- | The Amazon Resource Name (ARN) of the IAM role associated with the
    -- training jobs that the tuning job launches.
    HyperParameterTrainingJobDefinition -> Text
roleArn :: Prelude.Text,
    -- | Specifies the path to the Amazon S3 bucket where you store model
    -- artifacts from the training jobs that the tuning job launches.
    HyperParameterTrainingJobDefinition -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
    -- | The resources, including the compute instances and storage volumes, to
    -- use for the training jobs that the tuning job launches.
    --
    -- Storage volumes store model artifacts and incremental states. Training
    -- algorithms might also use storage volumes for scratch space. If you want
    -- Amazon SageMaker to use the storage volume to store the training data,
    -- choose @File@ as the @TrainingInputMode@ in the algorithm specification.
    -- For distributed training algorithms, specify an instance count greater
    -- than 1.
    HyperParameterTrainingJobDefinition -> ResourceConfig
resourceConfig :: ResourceConfig,
    -- | Specifies a limit to how long a model hyperparameter training job can
    -- run. It also specifies how long a managed spot training job has to
    -- complete. When the job reaches the time limit, Amazon SageMaker ends the
    -- training job. Use this API to cap model training costs.
    HyperParameterTrainingJobDefinition -> StoppingCondition
stoppingCondition :: StoppingCondition
  }
  deriving (HyperParameterTrainingJobDefinition
-> HyperParameterTrainingJobDefinition -> Bool
(HyperParameterTrainingJobDefinition
 -> HyperParameterTrainingJobDefinition -> Bool)
-> (HyperParameterTrainingJobDefinition
    -> HyperParameterTrainingJobDefinition -> Bool)
-> Eq HyperParameterTrainingJobDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HyperParameterTrainingJobDefinition
-> HyperParameterTrainingJobDefinition -> Bool
$c/= :: HyperParameterTrainingJobDefinition
-> HyperParameterTrainingJobDefinition -> Bool
== :: HyperParameterTrainingJobDefinition
-> HyperParameterTrainingJobDefinition -> Bool
$c== :: HyperParameterTrainingJobDefinition
-> HyperParameterTrainingJobDefinition -> Bool
Prelude.Eq, ReadPrec [HyperParameterTrainingJobDefinition]
ReadPrec HyperParameterTrainingJobDefinition
Int -> ReadS HyperParameterTrainingJobDefinition
ReadS [HyperParameterTrainingJobDefinition]
(Int -> ReadS HyperParameterTrainingJobDefinition)
-> ReadS [HyperParameterTrainingJobDefinition]
-> ReadPrec HyperParameterTrainingJobDefinition
-> ReadPrec [HyperParameterTrainingJobDefinition]
-> Read HyperParameterTrainingJobDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HyperParameterTrainingJobDefinition]
$creadListPrec :: ReadPrec [HyperParameterTrainingJobDefinition]
readPrec :: ReadPrec HyperParameterTrainingJobDefinition
$creadPrec :: ReadPrec HyperParameterTrainingJobDefinition
readList :: ReadS [HyperParameterTrainingJobDefinition]
$creadList :: ReadS [HyperParameterTrainingJobDefinition]
readsPrec :: Int -> ReadS HyperParameterTrainingJobDefinition
$creadsPrec :: Int -> ReadS HyperParameterTrainingJobDefinition
Prelude.Read, Int -> HyperParameterTrainingJobDefinition -> ShowS
[HyperParameterTrainingJobDefinition] -> ShowS
HyperParameterTrainingJobDefinition -> String
(Int -> HyperParameterTrainingJobDefinition -> ShowS)
-> (HyperParameterTrainingJobDefinition -> String)
-> ([HyperParameterTrainingJobDefinition] -> ShowS)
-> Show HyperParameterTrainingJobDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HyperParameterTrainingJobDefinition] -> ShowS
$cshowList :: [HyperParameterTrainingJobDefinition] -> ShowS
show :: HyperParameterTrainingJobDefinition -> String
$cshow :: HyperParameterTrainingJobDefinition -> String
showsPrec :: Int -> HyperParameterTrainingJobDefinition -> ShowS
$cshowsPrec :: Int -> HyperParameterTrainingJobDefinition -> ShowS
Prelude.Show, (forall x.
 HyperParameterTrainingJobDefinition
 -> Rep HyperParameterTrainingJobDefinition x)
-> (forall x.
    Rep HyperParameterTrainingJobDefinition x
    -> HyperParameterTrainingJobDefinition)
-> Generic HyperParameterTrainingJobDefinition
forall x.
Rep HyperParameterTrainingJobDefinition x
-> HyperParameterTrainingJobDefinition
forall x.
HyperParameterTrainingJobDefinition
-> Rep HyperParameterTrainingJobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HyperParameterTrainingJobDefinition x
-> HyperParameterTrainingJobDefinition
$cfrom :: forall x.
HyperParameterTrainingJobDefinition
-> Rep HyperParameterTrainingJobDefinition x
Prelude.Generic)

-- |
-- Create a value of 'HyperParameterTrainingJobDefinition' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tuningObjective', 'hyperParameterTrainingJobDefinition_tuningObjective' - Undocumented member.
--
-- 'checkpointConfig', 'hyperParameterTrainingJobDefinition_checkpointConfig' - Undocumented member.
--
-- 'hyperParameterRanges', 'hyperParameterTrainingJobDefinition_hyperParameterRanges' - Undocumented member.
--
-- 'retryStrategy', 'hyperParameterTrainingJobDefinition_retryStrategy' - The number of times to retry the job when the job fails due to an
-- @InternalServerError@.
--
-- 'enableNetworkIsolation', 'hyperParameterTrainingJobDefinition_enableNetworkIsolation' - Isolates the training container. No inbound or outbound network calls
-- can be made, except for calls between peers within a training cluster
-- for distributed training. If network isolation is used for training jobs
-- that are configured to use a VPC, Amazon SageMaker downloads and uploads
-- customer data and model artifacts through the specified VPC, but the
-- training container does not have network access.
--
-- 'staticHyperParameters', 'hyperParameterTrainingJobDefinition_staticHyperParameters' - Specifies the values of hyperparameters that do not change for the
-- tuning job.
--
-- 'enableManagedSpotTraining', 'hyperParameterTrainingJobDefinition_enableManagedSpotTraining' - A Boolean indicating whether managed spot training is enabled (@True@)
-- or not (@False@).
--
-- 'inputDataConfig', 'hyperParameterTrainingJobDefinition_inputDataConfig' - An array of Channel objects that specify the input for the training jobs
-- that the tuning job launches.
--
-- 'vpcConfig', 'hyperParameterTrainingJobDefinition_vpcConfig' - The VpcConfig object that specifies the VPC that you want the training
-- jobs that this hyperparameter tuning job launches to connect to. Control
-- access to and from your training container by configuring the VPC. For
-- more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html Protect Training Jobs by Using an Amazon Virtual Private Cloud>.
--
-- 'definitionName', 'hyperParameterTrainingJobDefinition_definitionName' - The job definition name.
--
-- 'enableInterContainerTrafficEncryption', 'hyperParameterTrainingJobDefinition_enableInterContainerTrafficEncryption' - To encrypt all communications between ML compute instances in
-- distributed training, choose @True@. Encryption provides greater
-- security for distributed training, but training might take longer. How
-- long it takes depends on the amount of communication between compute
-- instances, especially if you use a deep learning algorithm in
-- distributed training.
--
-- 'algorithmSpecification', 'hyperParameterTrainingJobDefinition_algorithmSpecification' - The HyperParameterAlgorithmSpecification object that specifies the
-- resource algorithm to use for the training jobs that the tuning job
-- launches.
--
-- 'roleArn', 'hyperParameterTrainingJobDefinition_roleArn' - The Amazon Resource Name (ARN) of the IAM role associated with the
-- training jobs that the tuning job launches.
--
-- 'outputDataConfig', 'hyperParameterTrainingJobDefinition_outputDataConfig' - Specifies the path to the Amazon S3 bucket where you store model
-- artifacts from the training jobs that the tuning job launches.
--
-- 'resourceConfig', 'hyperParameterTrainingJobDefinition_resourceConfig' - The resources, including the compute instances and storage volumes, to
-- use for the training jobs that the tuning job launches.
--
-- Storage volumes store model artifacts and incremental states. Training
-- algorithms might also use storage volumes for scratch space. If you want
-- Amazon SageMaker to use the storage volume to store the training data,
-- choose @File@ as the @TrainingInputMode@ in the algorithm specification.
-- For distributed training algorithms, specify an instance count greater
-- than 1.
--
-- 'stoppingCondition', 'hyperParameterTrainingJobDefinition_stoppingCondition' - Specifies a limit to how long a model hyperparameter training job can
-- run. It also specifies how long a managed spot training job has to
-- complete. When the job reaches the time limit, Amazon SageMaker ends the
-- training job. Use this API to cap model training costs.
newHyperParameterTrainingJobDefinition ::
  -- | 'algorithmSpecification'
  HyperParameterAlgorithmSpecification ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'resourceConfig'
  ResourceConfig ->
  -- | 'stoppingCondition'
  StoppingCondition ->
  HyperParameterTrainingJobDefinition
newHyperParameterTrainingJobDefinition :: HyperParameterAlgorithmSpecification
-> Text
-> OutputDataConfig
-> ResourceConfig
-> StoppingCondition
-> HyperParameterTrainingJobDefinition
newHyperParameterTrainingJobDefinition
  HyperParameterAlgorithmSpecification
pAlgorithmSpecification_
  Text
pRoleArn_
  OutputDataConfig
pOutputDataConfig_
  ResourceConfig
pResourceConfig_
  StoppingCondition
pStoppingCondition_ =
    HyperParameterTrainingJobDefinition' :: Maybe HyperParameterTuningJobObjective
-> Maybe CheckpointConfig
-> Maybe ParameterRanges
-> Maybe RetryStrategy
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe (NonEmpty Channel)
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Bool
-> HyperParameterAlgorithmSpecification
-> Text
-> OutputDataConfig
-> ResourceConfig
-> StoppingCondition
-> HyperParameterTrainingJobDefinition
HyperParameterTrainingJobDefinition'
      { $sel:tuningObjective:HyperParameterTrainingJobDefinition' :: Maybe HyperParameterTuningJobObjective
tuningObjective =
          Maybe HyperParameterTuningJobObjective
forall a. Maybe a
Prelude.Nothing,
        $sel:checkpointConfig:HyperParameterTrainingJobDefinition' :: Maybe CheckpointConfig
checkpointConfig = Maybe CheckpointConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:hyperParameterRanges:HyperParameterTrainingJobDefinition' :: Maybe ParameterRanges
hyperParameterRanges = Maybe ParameterRanges
forall a. Maybe a
Prelude.Nothing,
        $sel:retryStrategy:HyperParameterTrainingJobDefinition' :: Maybe RetryStrategy
retryStrategy = Maybe RetryStrategy
forall a. Maybe a
Prelude.Nothing,
        $sel:enableNetworkIsolation:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableNetworkIsolation =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:staticHyperParameters:HyperParameterTrainingJobDefinition' :: Maybe (HashMap Text Text)
staticHyperParameters =
          Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:enableManagedSpotTraining:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableManagedSpotTraining =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:HyperParameterTrainingJobDefinition' :: Maybe (NonEmpty Channel)
inputDataConfig = Maybe (NonEmpty Channel)
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:HyperParameterTrainingJobDefinition' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:definitionName:HyperParameterTrainingJobDefinition' :: Maybe Text
definitionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableInterContainerTrafficEncryption:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableInterContainerTrafficEncryption =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:algorithmSpecification:HyperParameterTrainingJobDefinition' :: HyperParameterAlgorithmSpecification
algorithmSpecification =
          HyperParameterAlgorithmSpecification
pAlgorithmSpecification_,
        $sel:roleArn:HyperParameterTrainingJobDefinition' :: Text
roleArn = Text
pRoleArn_,
        $sel:outputDataConfig:HyperParameterTrainingJobDefinition' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:resourceConfig:HyperParameterTrainingJobDefinition' :: ResourceConfig
resourceConfig = ResourceConfig
pResourceConfig_,
        $sel:stoppingCondition:HyperParameterTrainingJobDefinition' :: StoppingCondition
stoppingCondition =
          StoppingCondition
pStoppingCondition_
      }

-- | Undocumented member.
hyperParameterTrainingJobDefinition_tuningObjective :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe HyperParameterTuningJobObjective)
hyperParameterTrainingJobDefinition_tuningObjective :: (Maybe HyperParameterTuningJobObjective
 -> f (Maybe HyperParameterTuningJobObjective))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_tuningObjective = (HyperParameterTrainingJobDefinition
 -> Maybe HyperParameterTuningJobObjective)
-> (HyperParameterTrainingJobDefinition
    -> Maybe HyperParameterTuningJobObjective
    -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe HyperParameterTuningJobObjective)
     (Maybe HyperParameterTuningJobObjective)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe HyperParameterTuningJobObjective
tuningObjective :: Maybe HyperParameterTuningJobObjective
$sel:tuningObjective:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition
-> Maybe HyperParameterTuningJobObjective
tuningObjective} -> Maybe HyperParameterTuningJobObjective
tuningObjective) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe HyperParameterTuningJobObjective
a -> HyperParameterTrainingJobDefinition
s {$sel:tuningObjective:HyperParameterTrainingJobDefinition' :: Maybe HyperParameterTuningJobObjective
tuningObjective = Maybe HyperParameterTuningJobObjective
a} :: HyperParameterTrainingJobDefinition)

-- | Undocumented member.
hyperParameterTrainingJobDefinition_checkpointConfig :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe CheckpointConfig)
hyperParameterTrainingJobDefinition_checkpointConfig :: (Maybe CheckpointConfig -> f (Maybe CheckpointConfig))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_checkpointConfig = (HyperParameterTrainingJobDefinition -> Maybe CheckpointConfig)
-> (HyperParameterTrainingJobDefinition
    -> Maybe CheckpointConfig -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe CheckpointConfig)
     (Maybe CheckpointConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe CheckpointConfig
checkpointConfig :: Maybe CheckpointConfig
$sel:checkpointConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe CheckpointConfig
checkpointConfig} -> Maybe CheckpointConfig
checkpointConfig) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe CheckpointConfig
a -> HyperParameterTrainingJobDefinition
s {$sel:checkpointConfig:HyperParameterTrainingJobDefinition' :: Maybe CheckpointConfig
checkpointConfig = Maybe CheckpointConfig
a} :: HyperParameterTrainingJobDefinition)

-- | Undocumented member.
hyperParameterTrainingJobDefinition_hyperParameterRanges :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe ParameterRanges)
hyperParameterTrainingJobDefinition_hyperParameterRanges :: (Maybe ParameterRanges -> f (Maybe ParameterRanges))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_hyperParameterRanges = (HyperParameterTrainingJobDefinition -> Maybe ParameterRanges)
-> (HyperParameterTrainingJobDefinition
    -> Maybe ParameterRanges -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe ParameterRanges)
     (Maybe ParameterRanges)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe ParameterRanges
hyperParameterRanges :: Maybe ParameterRanges
$sel:hyperParameterRanges:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe ParameterRanges
hyperParameterRanges} -> Maybe ParameterRanges
hyperParameterRanges) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe ParameterRanges
a -> HyperParameterTrainingJobDefinition
s {$sel:hyperParameterRanges:HyperParameterTrainingJobDefinition' :: Maybe ParameterRanges
hyperParameterRanges = Maybe ParameterRanges
a} :: HyperParameterTrainingJobDefinition)

-- | The number of times to retry the job when the job fails due to an
-- @InternalServerError@.
hyperParameterTrainingJobDefinition_retryStrategy :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe RetryStrategy)
hyperParameterTrainingJobDefinition_retryStrategy :: (Maybe RetryStrategy -> f (Maybe RetryStrategy))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_retryStrategy = (HyperParameterTrainingJobDefinition -> Maybe RetryStrategy)
-> (HyperParameterTrainingJobDefinition
    -> Maybe RetryStrategy -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe RetryStrategy)
     (Maybe RetryStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe RetryStrategy
retryStrategy :: Maybe RetryStrategy
$sel:retryStrategy:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe RetryStrategy
retryStrategy} -> Maybe RetryStrategy
retryStrategy) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe RetryStrategy
a -> HyperParameterTrainingJobDefinition
s {$sel:retryStrategy:HyperParameterTrainingJobDefinition' :: Maybe RetryStrategy
retryStrategy = Maybe RetryStrategy
a} :: HyperParameterTrainingJobDefinition)

-- | Isolates the training container. No inbound or outbound network calls
-- can be made, except for calls between peers within a training cluster
-- for distributed training. If network isolation is used for training jobs
-- that are configured to use a VPC, Amazon SageMaker downloads and uploads
-- customer data and model artifacts through the specified VPC, but the
-- training container does not have network access.
hyperParameterTrainingJobDefinition_enableNetworkIsolation :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe Prelude.Bool)
hyperParameterTrainingJobDefinition_enableNetworkIsolation :: (Maybe Bool -> f (Maybe Bool))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_enableNetworkIsolation = (HyperParameterTrainingJobDefinition -> Maybe Bool)
-> (HyperParameterTrainingJobDefinition
    -> Maybe Bool -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe Bool
enableNetworkIsolation :: Maybe Bool
$sel:enableNetworkIsolation:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
enableNetworkIsolation} -> Maybe Bool
enableNetworkIsolation) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe Bool
a -> HyperParameterTrainingJobDefinition
s {$sel:enableNetworkIsolation:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableNetworkIsolation = Maybe Bool
a} :: HyperParameterTrainingJobDefinition)

-- | Specifies the values of hyperparameters that do not change for the
-- tuning job.
hyperParameterTrainingJobDefinition_staticHyperParameters :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
hyperParameterTrainingJobDefinition_staticHyperParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_staticHyperParameters = (HyperParameterTrainingJobDefinition -> Maybe (HashMap Text Text))
-> (HyperParameterTrainingJobDefinition
    -> Maybe (HashMap Text Text)
    -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe (HashMap Text Text)
staticHyperParameters :: Maybe (HashMap Text Text)
$sel:staticHyperParameters:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe (HashMap Text Text)
staticHyperParameters} -> Maybe (HashMap Text Text)
staticHyperParameters) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe (HashMap Text Text)
a -> HyperParameterTrainingJobDefinition
s {$sel:staticHyperParameters:HyperParameterTrainingJobDefinition' :: Maybe (HashMap Text Text)
staticHyperParameters = Maybe (HashMap Text Text)
a} :: HyperParameterTrainingJobDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> HyperParameterTrainingJobDefinition
 -> f HyperParameterTrainingJobDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A Boolean indicating whether managed spot training is enabled (@True@)
-- or not (@False@).
hyperParameterTrainingJobDefinition_enableManagedSpotTraining :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe Prelude.Bool)
hyperParameterTrainingJobDefinition_enableManagedSpotTraining :: (Maybe Bool -> f (Maybe Bool))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_enableManagedSpotTraining = (HyperParameterTrainingJobDefinition -> Maybe Bool)
-> (HyperParameterTrainingJobDefinition
    -> Maybe Bool -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe Bool
enableManagedSpotTraining :: Maybe Bool
$sel:enableManagedSpotTraining:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
enableManagedSpotTraining} -> Maybe Bool
enableManagedSpotTraining) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe Bool
a -> HyperParameterTrainingJobDefinition
s {$sel:enableManagedSpotTraining:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableManagedSpotTraining = Maybe Bool
a} :: HyperParameterTrainingJobDefinition)

-- | An array of Channel objects that specify the input for the training jobs
-- that the tuning job launches.
hyperParameterTrainingJobDefinition_inputDataConfig :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe (Prelude.NonEmpty Channel))
hyperParameterTrainingJobDefinition_inputDataConfig :: (Maybe (NonEmpty Channel) -> f (Maybe (NonEmpty Channel)))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_inputDataConfig = (HyperParameterTrainingJobDefinition -> Maybe (NonEmpty Channel))
-> (HyperParameterTrainingJobDefinition
    -> Maybe (NonEmpty Channel) -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe (NonEmpty Channel))
     (Maybe (NonEmpty Channel))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe (NonEmpty Channel)
inputDataConfig :: Maybe (NonEmpty Channel)
$sel:inputDataConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe (NonEmpty Channel)
inputDataConfig} -> Maybe (NonEmpty Channel)
inputDataConfig) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe (NonEmpty Channel)
a -> HyperParameterTrainingJobDefinition
s {$sel:inputDataConfig:HyperParameterTrainingJobDefinition' :: Maybe (NonEmpty Channel)
inputDataConfig = Maybe (NonEmpty Channel)
a} :: HyperParameterTrainingJobDefinition) ((Maybe (NonEmpty Channel) -> f (Maybe (NonEmpty Channel)))
 -> HyperParameterTrainingJobDefinition
 -> f HyperParameterTrainingJobDefinition)
-> ((Maybe (NonEmpty Channel) -> f (Maybe (NonEmpty Channel)))
    -> Maybe (NonEmpty Channel) -> f (Maybe (NonEmpty Channel)))
-> (Maybe (NonEmpty Channel) -> f (Maybe (NonEmpty Channel)))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Channel)
  (NonEmpty Channel)
  (NonEmpty Channel)
  (NonEmpty Channel)
-> Iso
     (Maybe (NonEmpty Channel))
     (Maybe (NonEmpty Channel))
     (Maybe (NonEmpty Channel))
     (Maybe (NonEmpty Channel))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Channel)
  (NonEmpty Channel)
  (NonEmpty Channel)
  (NonEmpty Channel)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VpcConfig object that specifies the VPC that you want the training
-- jobs that this hyperparameter tuning job launches to connect to. Control
-- access to and from your training container by configuring the VPC. For
-- more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html Protect Training Jobs by Using an Amazon Virtual Private Cloud>.
hyperParameterTrainingJobDefinition_vpcConfig :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe VpcConfig)
hyperParameterTrainingJobDefinition_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_vpcConfig = (HyperParameterTrainingJobDefinition -> Maybe VpcConfig)
-> (HyperParameterTrainingJobDefinition
    -> Maybe VpcConfig -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe VpcConfig)
     (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe VpcConfig
a -> HyperParameterTrainingJobDefinition
s {$sel:vpcConfig:HyperParameterTrainingJobDefinition' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: HyperParameterTrainingJobDefinition)

-- | The job definition name.
hyperParameterTrainingJobDefinition_definitionName :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe Prelude.Text)
hyperParameterTrainingJobDefinition_definitionName :: (Maybe Text -> f (Maybe Text))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_definitionName = (HyperParameterTrainingJobDefinition -> Maybe Text)
-> (HyperParameterTrainingJobDefinition
    -> Maybe Text -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe Text
definitionName :: Maybe Text
$sel:definitionName:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Text
definitionName} -> Maybe Text
definitionName) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe Text
a -> HyperParameterTrainingJobDefinition
s {$sel:definitionName:HyperParameterTrainingJobDefinition' :: Maybe Text
definitionName = Maybe Text
a} :: HyperParameterTrainingJobDefinition)

-- | To encrypt all communications between ML compute instances in
-- distributed training, choose @True@. Encryption provides greater
-- security for distributed training, but training might take longer. How
-- long it takes depends on the amount of communication between compute
-- instances, especially if you use a deep learning algorithm in
-- distributed training.
hyperParameterTrainingJobDefinition_enableInterContainerTrafficEncryption :: Lens.Lens' HyperParameterTrainingJobDefinition (Prelude.Maybe Prelude.Bool)
hyperParameterTrainingJobDefinition_enableInterContainerTrafficEncryption :: (Maybe Bool -> f (Maybe Bool))
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_enableInterContainerTrafficEncryption = (HyperParameterTrainingJobDefinition -> Maybe Bool)
-> (HyperParameterTrainingJobDefinition
    -> Maybe Bool -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Maybe Bool
enableInterContainerTrafficEncryption :: Maybe Bool
$sel:enableInterContainerTrafficEncryption:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
enableInterContainerTrafficEncryption} -> Maybe Bool
enableInterContainerTrafficEncryption) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Maybe Bool
a -> HyperParameterTrainingJobDefinition
s {$sel:enableInterContainerTrafficEncryption:HyperParameterTrainingJobDefinition' :: Maybe Bool
enableInterContainerTrafficEncryption = Maybe Bool
a} :: HyperParameterTrainingJobDefinition)

-- | The HyperParameterAlgorithmSpecification object that specifies the
-- resource algorithm to use for the training jobs that the tuning job
-- launches.
hyperParameterTrainingJobDefinition_algorithmSpecification :: Lens.Lens' HyperParameterTrainingJobDefinition HyperParameterAlgorithmSpecification
hyperParameterTrainingJobDefinition_algorithmSpecification :: (HyperParameterAlgorithmSpecification
 -> f HyperParameterAlgorithmSpecification)
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_algorithmSpecification = (HyperParameterTrainingJobDefinition
 -> HyperParameterAlgorithmSpecification)
-> (HyperParameterTrainingJobDefinition
    -> HyperParameterAlgorithmSpecification
    -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     HyperParameterAlgorithmSpecification
     HyperParameterAlgorithmSpecification
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {HyperParameterAlgorithmSpecification
algorithmSpecification :: HyperParameterAlgorithmSpecification
$sel:algorithmSpecification:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition
-> HyperParameterAlgorithmSpecification
algorithmSpecification} -> HyperParameterAlgorithmSpecification
algorithmSpecification) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} HyperParameterAlgorithmSpecification
a -> HyperParameterTrainingJobDefinition
s {$sel:algorithmSpecification:HyperParameterTrainingJobDefinition' :: HyperParameterAlgorithmSpecification
algorithmSpecification = HyperParameterAlgorithmSpecification
a} :: HyperParameterTrainingJobDefinition)

-- | The Amazon Resource Name (ARN) of the IAM role associated with the
-- training jobs that the tuning job launches.
hyperParameterTrainingJobDefinition_roleArn :: Lens.Lens' HyperParameterTrainingJobDefinition Prelude.Text
hyperParameterTrainingJobDefinition_roleArn :: (Text -> f Text)
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_roleArn = (HyperParameterTrainingJobDefinition -> Text)
-> (HyperParameterTrainingJobDefinition
    -> Text -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {Text
roleArn :: Text
$sel:roleArn:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Text
roleArn} -> Text
roleArn) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} Text
a -> HyperParameterTrainingJobDefinition
s {$sel:roleArn:HyperParameterTrainingJobDefinition' :: Text
roleArn = Text
a} :: HyperParameterTrainingJobDefinition)

-- | Specifies the path to the Amazon S3 bucket where you store model
-- artifacts from the training jobs that the tuning job launches.
hyperParameterTrainingJobDefinition_outputDataConfig :: Lens.Lens' HyperParameterTrainingJobDefinition OutputDataConfig
hyperParameterTrainingJobDefinition_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_outputDataConfig = (HyperParameterTrainingJobDefinition -> OutputDataConfig)
-> (HyperParameterTrainingJobDefinition
    -> OutputDataConfig -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     OutputDataConfig
     OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} OutputDataConfig
a -> HyperParameterTrainingJobDefinition
s {$sel:outputDataConfig:HyperParameterTrainingJobDefinition' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: HyperParameterTrainingJobDefinition)

-- | The resources, including the compute instances and storage volumes, to
-- use for the training jobs that the tuning job launches.
--
-- Storage volumes store model artifacts and incremental states. Training
-- algorithms might also use storage volumes for scratch space. If you want
-- Amazon SageMaker to use the storage volume to store the training data,
-- choose @File@ as the @TrainingInputMode@ in the algorithm specification.
-- For distributed training algorithms, specify an instance count greater
-- than 1.
hyperParameterTrainingJobDefinition_resourceConfig :: Lens.Lens' HyperParameterTrainingJobDefinition ResourceConfig
hyperParameterTrainingJobDefinition_resourceConfig :: (ResourceConfig -> f ResourceConfig)
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_resourceConfig = (HyperParameterTrainingJobDefinition -> ResourceConfig)
-> (HyperParameterTrainingJobDefinition
    -> ResourceConfig -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     ResourceConfig
     ResourceConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {ResourceConfig
resourceConfig :: ResourceConfig
$sel:resourceConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> ResourceConfig
resourceConfig} -> ResourceConfig
resourceConfig) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} ResourceConfig
a -> HyperParameterTrainingJobDefinition
s {$sel:resourceConfig:HyperParameterTrainingJobDefinition' :: ResourceConfig
resourceConfig = ResourceConfig
a} :: HyperParameterTrainingJobDefinition)

-- | Specifies a limit to how long a model hyperparameter training job can
-- run. It also specifies how long a managed spot training job has to
-- complete. When the job reaches the time limit, Amazon SageMaker ends the
-- training job. Use this API to cap model training costs.
hyperParameterTrainingJobDefinition_stoppingCondition :: Lens.Lens' HyperParameterTrainingJobDefinition StoppingCondition
hyperParameterTrainingJobDefinition_stoppingCondition :: (StoppingCondition -> f StoppingCondition)
-> HyperParameterTrainingJobDefinition
-> f HyperParameterTrainingJobDefinition
hyperParameterTrainingJobDefinition_stoppingCondition = (HyperParameterTrainingJobDefinition -> StoppingCondition)
-> (HyperParameterTrainingJobDefinition
    -> StoppingCondition -> HyperParameterTrainingJobDefinition)
-> Lens
     HyperParameterTrainingJobDefinition
     HyperParameterTrainingJobDefinition
     StoppingCondition
     StoppingCondition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobDefinition' {StoppingCondition
stoppingCondition :: StoppingCondition
$sel:stoppingCondition:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> StoppingCondition
stoppingCondition} -> StoppingCondition
stoppingCondition) (\s :: HyperParameterTrainingJobDefinition
s@HyperParameterTrainingJobDefinition' {} StoppingCondition
a -> HyperParameterTrainingJobDefinition
s {$sel:stoppingCondition:HyperParameterTrainingJobDefinition' :: StoppingCondition
stoppingCondition = StoppingCondition
a} :: HyperParameterTrainingJobDefinition)

instance
  Core.FromJSON
    HyperParameterTrainingJobDefinition
  where
  parseJSON :: Value -> Parser HyperParameterTrainingJobDefinition
parseJSON =
    String
-> (Object -> Parser HyperParameterTrainingJobDefinition)
-> Value
-> Parser HyperParameterTrainingJobDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HyperParameterTrainingJobDefinition"
      ( \Object
x ->
          Maybe HyperParameterTuningJobObjective
-> Maybe CheckpointConfig
-> Maybe ParameterRanges
-> Maybe RetryStrategy
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe (NonEmpty Channel)
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Bool
-> HyperParameterAlgorithmSpecification
-> Text
-> OutputDataConfig
-> ResourceConfig
-> StoppingCondition
-> HyperParameterTrainingJobDefinition
HyperParameterTrainingJobDefinition'
            (Maybe HyperParameterTuningJobObjective
 -> Maybe CheckpointConfig
 -> Maybe ParameterRanges
 -> Maybe RetryStrategy
 -> Maybe Bool
 -> Maybe (HashMap Text Text)
 -> Maybe Bool
 -> Maybe (NonEmpty Channel)
 -> Maybe VpcConfig
 -> Maybe Text
 -> Maybe Bool
 -> HyperParameterAlgorithmSpecification
 -> Text
 -> OutputDataConfig
 -> ResourceConfig
 -> StoppingCondition
 -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe HyperParameterTuningJobObjective)
-> Parser
     (Maybe CheckpointConfig
      -> Maybe ParameterRanges
      -> Maybe RetryStrategy
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HyperParameterTuningJobObjective)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TuningObjective")
            Parser
  (Maybe CheckpointConfig
   -> Maybe ParameterRanges
   -> Maybe RetryStrategy
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe CheckpointConfig)
-> Parser
     (Maybe ParameterRanges
      -> Maybe RetryStrategy
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CheckpointConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CheckpointConfig")
            Parser
  (Maybe ParameterRanges
   -> Maybe RetryStrategy
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe ParameterRanges)
-> Parser
     (Maybe RetryStrategy
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterRanges)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HyperParameterRanges")
            Parser
  (Maybe RetryStrategy
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe RetryStrategy)
-> Parser
     (Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RetryStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetryStrategy")
            Parser
  (Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableNetworkIsolation")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Bool
      -> Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StaticHyperParameters"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Bool
   -> Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (NonEmpty Channel)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableManagedSpotTraining")
            Parser
  (Maybe (NonEmpty Channel)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe (NonEmpty Channel))
-> Parser
     (Maybe VpcConfig
      -> Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Channel))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDataConfig")
            Parser
  (Maybe VpcConfig
   -> Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe VpcConfig)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcConfig")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefinitionName")
            Parser
  (Maybe Bool
   -> HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser (Maybe Bool)
-> Parser
     (HyperParameterAlgorithmSpecification
      -> Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableInterContainerTrafficEncryption")
            Parser
  (HyperParameterAlgorithmSpecification
   -> Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser HyperParameterAlgorithmSpecification
-> Parser
     (Text
      -> OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser HyperParameterAlgorithmSpecification
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AlgorithmSpecification")
            Parser
  (Text
   -> OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser Text
-> Parser
     (OutputDataConfig
      -> ResourceConfig
      -> StoppingCondition
      -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RoleArn")
            Parser
  (OutputDataConfig
   -> ResourceConfig
   -> StoppingCondition
   -> HyperParameterTrainingJobDefinition)
-> Parser OutputDataConfig
-> Parser
     (ResourceConfig
      -> StoppingCondition -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OutputDataConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputDataConfig")
            Parser
  (ResourceConfig
   -> StoppingCondition -> HyperParameterTrainingJobDefinition)
-> Parser ResourceConfig
-> Parser
     (StoppingCondition -> HyperParameterTrainingJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceConfig")
            Parser (StoppingCondition -> HyperParameterTrainingJobDefinition)
-> Parser StoppingCondition
-> Parser HyperParameterTrainingJobDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser StoppingCondition
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StoppingCondition")
      )

instance
  Prelude.Hashable
    HyperParameterTrainingJobDefinition

instance
  Prelude.NFData
    HyperParameterTrainingJobDefinition

instance
  Core.ToJSON
    HyperParameterTrainingJobDefinition
  where
  toJSON :: HyperParameterTrainingJobDefinition -> Value
toJSON HyperParameterTrainingJobDefinition' {Maybe Bool
Maybe (NonEmpty Channel)
Maybe Text
Maybe (HashMap Text Text)
Maybe CheckpointConfig
Maybe HyperParameterTuningJobObjective
Maybe ParameterRanges
Maybe RetryStrategy
Maybe VpcConfig
Text
OutputDataConfig
StoppingCondition
HyperParameterAlgorithmSpecification
ResourceConfig
stoppingCondition :: StoppingCondition
resourceConfig :: ResourceConfig
outputDataConfig :: OutputDataConfig
roleArn :: Text
algorithmSpecification :: HyperParameterAlgorithmSpecification
enableInterContainerTrafficEncryption :: Maybe Bool
definitionName :: Maybe Text
vpcConfig :: Maybe VpcConfig
inputDataConfig :: Maybe (NonEmpty Channel)
enableManagedSpotTraining :: Maybe Bool
staticHyperParameters :: Maybe (HashMap Text Text)
enableNetworkIsolation :: Maybe Bool
retryStrategy :: Maybe RetryStrategy
hyperParameterRanges :: Maybe ParameterRanges
checkpointConfig :: Maybe CheckpointConfig
tuningObjective :: Maybe HyperParameterTuningJobObjective
$sel:stoppingCondition:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> StoppingCondition
$sel:resourceConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> ResourceConfig
$sel:outputDataConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> OutputDataConfig
$sel:roleArn:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Text
$sel:algorithmSpecification:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition
-> HyperParameterAlgorithmSpecification
$sel:enableInterContainerTrafficEncryption:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
$sel:definitionName:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Text
$sel:vpcConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe VpcConfig
$sel:inputDataConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe (NonEmpty Channel)
$sel:enableManagedSpotTraining:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
$sel:staticHyperParameters:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe (HashMap Text Text)
$sel:enableNetworkIsolation:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe Bool
$sel:retryStrategy:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe RetryStrategy
$sel:hyperParameterRanges:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe ParameterRanges
$sel:checkpointConfig:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition -> Maybe CheckpointConfig
$sel:tuningObjective:HyperParameterTrainingJobDefinition' :: HyperParameterTrainingJobDefinition
-> Maybe HyperParameterTuningJobObjective
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TuningObjective" Text -> HyperParameterTuningJobObjective -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HyperParameterTuningJobObjective -> Pair)
-> Maybe HyperParameterTuningJobObjective -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobObjective
tuningObjective,
            (Text
"CheckpointConfig" Text -> CheckpointConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CheckpointConfig -> Pair) -> Maybe CheckpointConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CheckpointConfig
checkpointConfig,
            (Text
"HyperParameterRanges" Text -> ParameterRanges -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ParameterRanges -> Pair) -> Maybe ParameterRanges -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParameterRanges
hyperParameterRanges,
            (Text
"RetryStrategy" Text -> RetryStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RetryStrategy -> Pair) -> Maybe RetryStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RetryStrategy
retryStrategy,
            (Text
"EnableNetworkIsolation" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableNetworkIsolation,
            (Text
"StaticHyperParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
staticHyperParameters,
            (Text
"EnableManagedSpotTraining" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableManagedSpotTraining,
            (Text
"InputDataConfig" Text -> NonEmpty Channel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty Channel -> Pair)
-> Maybe (NonEmpty Channel) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Channel)
inputDataConfig,
            (Text
"VpcConfig" Text -> VpcConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfig -> Pair) -> Maybe VpcConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
            (Text
"DefinitionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
definitionName,
            (Text
"EnableInterContainerTrafficEncryption" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableInterContainerTrafficEncryption,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"AlgorithmSpecification"
                  Text -> HyperParameterAlgorithmSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HyperParameterAlgorithmSpecification
algorithmSpecification
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OutputDataConfig" Text -> OutputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutputDataConfig
outputDataConfig),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ResourceConfig" Text -> ResourceConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ResourceConfig
resourceConfig),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"StoppingCondition" Text -> StoppingCondition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= StoppingCondition
stoppingCondition)
          ]
      )