{-# 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 #-}
module Amazonka.SageMaker.Types.HyperParameterTuningJobConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.HyperParameterTuningJobObjective
import Amazonka.SageMaker.Types.HyperParameterTuningJobStrategyConfig
import Amazonka.SageMaker.Types.HyperParameterTuningJobStrategyType
import Amazonka.SageMaker.Types.ParameterRanges
import Amazonka.SageMaker.Types.ResourceLimits
import Amazonka.SageMaker.Types.TrainingJobEarlyStoppingType
import Amazonka.SageMaker.Types.TuningJobCompletionCriteria
data HyperParameterTuningJobConfig = HyperParameterTuningJobConfig'
  { 
    
    
    HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective :: Prelude.Maybe HyperParameterTuningJobObjective,
    
    
    
    HyperParameterTuningJobConfig -> Maybe ParameterRanges
parameterRanges :: Prelude.Maybe ParameterRanges,
    
    
    
    
    HyperParameterTuningJobConfig -> Maybe Natural
randomSeed :: Prelude.Maybe Prelude.Natural,
    
    
    
    HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobStrategyConfig
strategyConfig :: Prelude.Maybe HyperParameterTuningJobStrategyConfig,
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType :: Prelude.Maybe TrainingJobEarlyStoppingType,
    
    HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria :: Prelude.Maybe TuningJobCompletionCriteria,
    
    
    
    
    HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
strategy :: HyperParameterTuningJobStrategyType,
    
    
    
    HyperParameterTuningJobConfig -> ResourceLimits
resourceLimits :: ResourceLimits
  }
  deriving (HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
$c/= :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
== :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
$c== :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
Prelude.Eq, ReadPrec [HyperParameterTuningJobConfig]
ReadPrec HyperParameterTuningJobConfig
Int -> ReadS HyperParameterTuningJobConfig
ReadS [HyperParameterTuningJobConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HyperParameterTuningJobConfig]
$creadListPrec :: ReadPrec [HyperParameterTuningJobConfig]
readPrec :: ReadPrec HyperParameterTuningJobConfig
$creadPrec :: ReadPrec HyperParameterTuningJobConfig
readList :: ReadS [HyperParameterTuningJobConfig]
$creadList :: ReadS [HyperParameterTuningJobConfig]
readsPrec :: Int -> ReadS HyperParameterTuningJobConfig
$creadsPrec :: Int -> ReadS HyperParameterTuningJobConfig
Prelude.Read, Int -> HyperParameterTuningJobConfig -> ShowS
[HyperParameterTuningJobConfig] -> ShowS
HyperParameterTuningJobConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HyperParameterTuningJobConfig] -> ShowS
$cshowList :: [HyperParameterTuningJobConfig] -> ShowS
show :: HyperParameterTuningJobConfig -> String
$cshow :: HyperParameterTuningJobConfig -> String
showsPrec :: Int -> HyperParameterTuningJobConfig -> ShowS
$cshowsPrec :: Int -> HyperParameterTuningJobConfig -> ShowS
Prelude.Show, forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig
forall x.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig
$cfrom :: forall x.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x
Prelude.Generic)
newHyperParameterTuningJobConfig ::
  
  HyperParameterTuningJobStrategyType ->
  
  ResourceLimits ->
  HyperParameterTuningJobConfig
newHyperParameterTuningJobConfig :: HyperParameterTuningJobStrategyType
-> ResourceLimits -> HyperParameterTuningJobConfig
newHyperParameterTuningJobConfig
  HyperParameterTuningJobStrategyType
pStrategy_
  ResourceLimits
pResourceLimits_ =
    HyperParameterTuningJobConfig'
      { $sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective =
          forall a. Maybe a
Prelude.Nothing,
        $sel:parameterRanges:HyperParameterTuningJobConfig' :: Maybe ParameterRanges
parameterRanges = forall a. Maybe a
Prelude.Nothing,
        $sel:randomSeed:HyperParameterTuningJobConfig' :: Maybe Natural
randomSeed = forall a. Maybe a
Prelude.Nothing,
        $sel:strategyConfig:HyperParameterTuningJobConfig' :: Maybe HyperParameterTuningJobStrategyConfig
strategyConfig = forall a. Maybe a
Prelude.Nothing,
        $sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria =
          forall a. Maybe a
Prelude.Nothing,
        $sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobStrategyType
strategy = HyperParameterTuningJobStrategyType
pStrategy_,
        $sel:resourceLimits:HyperParameterTuningJobConfig' :: ResourceLimits
resourceLimits = ResourceLimits
pResourceLimits_
      }
hyperParameterTuningJobConfig_hyperParameterTuningJobObjective :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe HyperParameterTuningJobObjective)
hyperParameterTuningJobConfig_hyperParameterTuningJobObjective :: Lens'
  HyperParameterTuningJobConfig
  (Maybe HyperParameterTuningJobObjective)
hyperParameterTuningJobConfig_hyperParameterTuningJobObjective = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective :: Maybe HyperParameterTuningJobObjective
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective} -> Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe HyperParameterTuningJobObjective
a -> HyperParameterTuningJobConfig
s {$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective = Maybe HyperParameterTuningJobObjective
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_parameterRanges :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe ParameterRanges)
hyperParameterTuningJobConfig_parameterRanges :: Lens' HyperParameterTuningJobConfig (Maybe ParameterRanges)
hyperParameterTuningJobConfig_parameterRanges = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe ParameterRanges
parameterRanges :: Maybe ParameterRanges
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
parameterRanges} -> Maybe ParameterRanges
parameterRanges) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe ParameterRanges
a -> HyperParameterTuningJobConfig
s {$sel:parameterRanges:HyperParameterTuningJobConfig' :: Maybe ParameterRanges
parameterRanges = Maybe ParameterRanges
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_randomSeed :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe Prelude.Natural)
hyperParameterTuningJobConfig_randomSeed :: Lens' HyperParameterTuningJobConfig (Maybe Natural)
hyperParameterTuningJobConfig_randomSeed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe Natural
randomSeed :: Maybe Natural
$sel:randomSeed:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe Natural
randomSeed} -> Maybe Natural
randomSeed) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe Natural
a -> HyperParameterTuningJobConfig
s {$sel:randomSeed:HyperParameterTuningJobConfig' :: Maybe Natural
randomSeed = Maybe Natural
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_strategyConfig :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe HyperParameterTuningJobStrategyConfig)
hyperParameterTuningJobConfig_strategyConfig :: Lens'
  HyperParameterTuningJobConfig
  (Maybe HyperParameterTuningJobStrategyConfig)
hyperParameterTuningJobConfig_strategyConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe HyperParameterTuningJobStrategyConfig
strategyConfig :: Maybe HyperParameterTuningJobStrategyConfig
$sel:strategyConfig:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobStrategyConfig
strategyConfig} -> Maybe HyperParameterTuningJobStrategyConfig
strategyConfig) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe HyperParameterTuningJobStrategyConfig
a -> HyperParameterTuningJobConfig
s {$sel:strategyConfig:HyperParameterTuningJobConfig' :: Maybe HyperParameterTuningJobStrategyConfig
strategyConfig = Maybe HyperParameterTuningJobStrategyConfig
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_trainingJobEarlyStoppingType :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe TrainingJobEarlyStoppingType)
hyperParameterTuningJobConfig_trainingJobEarlyStoppingType :: Lens'
  HyperParameterTuningJobConfig (Maybe TrainingJobEarlyStoppingType)
hyperParameterTuningJobConfig_trainingJobEarlyStoppingType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType :: Maybe TrainingJobEarlyStoppingType
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType} -> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe TrainingJobEarlyStoppingType
a -> HyperParameterTuningJobConfig
s {$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType = Maybe TrainingJobEarlyStoppingType
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_tuningJobCompletionCriteria :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe TuningJobCompletionCriteria)
hyperParameterTuningJobConfig_tuningJobCompletionCriteria :: Lens'
  HyperParameterTuningJobConfig (Maybe TuningJobCompletionCriteria)
hyperParameterTuningJobConfig_tuningJobCompletionCriteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria :: Maybe TuningJobCompletionCriteria
$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria} -> Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe TuningJobCompletionCriteria
a -> HyperParameterTuningJobConfig
s {$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria = Maybe TuningJobCompletionCriteria
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_strategy :: Lens.Lens' HyperParameterTuningJobConfig HyperParameterTuningJobStrategyType
hyperParameterTuningJobConfig_strategy :: Lens'
  HyperParameterTuningJobConfig HyperParameterTuningJobStrategyType
hyperParameterTuningJobConfig_strategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {HyperParameterTuningJobStrategyType
strategy :: HyperParameterTuningJobStrategyType
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
strategy} -> HyperParameterTuningJobStrategyType
strategy) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} HyperParameterTuningJobStrategyType
a -> HyperParameterTuningJobConfig
s {$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobStrategyType
strategy = HyperParameterTuningJobStrategyType
a} :: HyperParameterTuningJobConfig)
hyperParameterTuningJobConfig_resourceLimits :: Lens.Lens' HyperParameterTuningJobConfig ResourceLimits
hyperParameterTuningJobConfig_resourceLimits :: Lens' HyperParameterTuningJobConfig ResourceLimits
hyperParameterTuningJobConfig_resourceLimits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {ResourceLimits
resourceLimits :: ResourceLimits
$sel:resourceLimits:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> ResourceLimits
resourceLimits} -> ResourceLimits
resourceLimits) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} ResourceLimits
a -> HyperParameterTuningJobConfig
s {$sel:resourceLimits:HyperParameterTuningJobConfig' :: ResourceLimits
resourceLimits = ResourceLimits
a} :: HyperParameterTuningJobConfig)
instance Data.FromJSON HyperParameterTuningJobConfig where
  parseJSON :: Value -> Parser HyperParameterTuningJobConfig
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"HyperParameterTuningJobConfig"
      ( \Object
x ->
          Maybe HyperParameterTuningJobObjective
-> Maybe ParameterRanges
-> Maybe Natural
-> Maybe HyperParameterTuningJobStrategyConfig
-> Maybe TrainingJobEarlyStoppingType
-> Maybe TuningJobCompletionCriteria
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig
HyperParameterTuningJobConfig'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HyperParameterTuningJobObjective")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ParameterRanges")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RandomSeed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StrategyConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TrainingJobEarlyStoppingType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TuningJobCompletionCriteria")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Strategy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ResourceLimits")
      )
instance
  Prelude.Hashable
    HyperParameterTuningJobConfig
  where
  hashWithSalt :: Int -> HyperParameterTuningJobConfig -> Int
hashWithSalt Int
_salt HyperParameterTuningJobConfig' {Maybe Natural
Maybe HyperParameterTuningJobObjective
Maybe HyperParameterTuningJobStrategyConfig
Maybe ParameterRanges
Maybe TrainingJobEarlyStoppingType
Maybe TuningJobCompletionCriteria
HyperParameterTuningJobStrategyType
ResourceLimits
resourceLimits :: ResourceLimits
strategy :: HyperParameterTuningJobStrategyType
tuningJobCompletionCriteria :: Maybe TuningJobCompletionCriteria
trainingJobEarlyStoppingType :: Maybe TrainingJobEarlyStoppingType
strategyConfig :: Maybe HyperParameterTuningJobStrategyConfig
randomSeed :: Maybe Natural
parameterRanges :: Maybe ParameterRanges
hyperParameterTuningJobObjective :: Maybe HyperParameterTuningJobObjective
$sel:resourceLimits:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> ResourceLimits
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
$sel:strategyConfig:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobStrategyConfig
$sel:randomSeed:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe Natural
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ParameterRanges
parameterRanges
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
randomSeed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HyperParameterTuningJobStrategyConfig
strategyConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HyperParameterTuningJobStrategyType
strategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceLimits
resourceLimits
instance Prelude.NFData HyperParameterTuningJobConfig where
  rnf :: HyperParameterTuningJobConfig -> ()
rnf HyperParameterTuningJobConfig' {Maybe Natural
Maybe HyperParameterTuningJobObjective
Maybe HyperParameterTuningJobStrategyConfig
Maybe ParameterRanges
Maybe TrainingJobEarlyStoppingType
Maybe TuningJobCompletionCriteria
HyperParameterTuningJobStrategyType
ResourceLimits
resourceLimits :: ResourceLimits
strategy :: HyperParameterTuningJobStrategyType
tuningJobCompletionCriteria :: Maybe TuningJobCompletionCriteria
trainingJobEarlyStoppingType :: Maybe TrainingJobEarlyStoppingType
strategyConfig :: Maybe HyperParameterTuningJobStrategyConfig
randomSeed :: Maybe Natural
parameterRanges :: Maybe ParameterRanges
hyperParameterTuningJobObjective :: Maybe HyperParameterTuningJobObjective
$sel:resourceLimits:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> ResourceLimits
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
$sel:strategyConfig:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobStrategyConfig
$sel:randomSeed:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe Natural
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ParameterRanges
parameterRanges
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
randomSeed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HyperParameterTuningJobStrategyConfig
strategyConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HyperParameterTuningJobStrategyType
strategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceLimits
resourceLimits
instance Data.ToJSON HyperParameterTuningJobConfig where
  toJSON :: HyperParameterTuningJobConfig -> Value
toJSON HyperParameterTuningJobConfig' {Maybe Natural
Maybe HyperParameterTuningJobObjective
Maybe HyperParameterTuningJobStrategyConfig
Maybe ParameterRanges
Maybe TrainingJobEarlyStoppingType
Maybe TuningJobCompletionCriteria
HyperParameterTuningJobStrategyType
ResourceLimits
resourceLimits :: ResourceLimits
strategy :: HyperParameterTuningJobStrategyType
tuningJobCompletionCriteria :: Maybe TuningJobCompletionCriteria
trainingJobEarlyStoppingType :: Maybe TrainingJobEarlyStoppingType
strategyConfig :: Maybe HyperParameterTuningJobStrategyConfig
randomSeed :: Maybe Natural
parameterRanges :: Maybe ParameterRanges
hyperParameterTuningJobObjective :: Maybe HyperParameterTuningJobObjective
$sel:resourceLimits:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> ResourceLimits
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
$sel:strategyConfig:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobStrategyConfig
$sel:randomSeed:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe Natural
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"HyperParameterTuningJobObjective" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective,
            (Key
"ParameterRanges" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParameterRanges
parameterRanges,
            (Key
"RandomSeed" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
randomSeed,
            (Key
"StrategyConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobStrategyConfig
strategyConfig,
            (Key
"TrainingJobEarlyStoppingType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType,
            (Key
"TuningJobCompletionCriteria" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria,
            forall a. a -> Maybe a
Prelude.Just (Key
"Strategy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= HyperParameterTuningJobStrategyType
strategy),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ResourceLimits" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ResourceLimits
resourceLimits)
          ]
      )