{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.HyperParameterTuningJobObjective
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 TuningJobCompletionCriteria
tuningJobCompletionCriteria :: Prelude.Maybe TuningJobCompletionCriteria,
HyperParameterTuningJobConfig -> Maybe ParameterRanges
parameterRanges :: Prelude.Maybe ParameterRanges,
HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective :: Prelude.Maybe HyperParameterTuningJobObjective,
HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType :: Prelude.Maybe TrainingJobEarlyStoppingType,
HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
strategy :: HyperParameterTuningJobStrategyType,
HyperParameterTuningJobConfig -> ResourceLimits
resourceLimits :: ResourceLimits
}
deriving (HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
(HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool)
-> (HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool)
-> Eq HyperParameterTuningJobConfig
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]
(Int -> ReadS HyperParameterTuningJobConfig)
-> ReadS [HyperParameterTuningJobConfig]
-> ReadPrec HyperParameterTuningJobConfig
-> ReadPrec [HyperParameterTuningJobConfig]
-> Read 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
(Int -> HyperParameterTuningJobConfig -> ShowS)
-> (HyperParameterTuningJobConfig -> String)
-> ([HyperParameterTuningJobConfig] -> ShowS)
-> Show HyperParameterTuningJobConfig
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.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x)
-> (forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig)
-> Generic HyperParameterTuningJobConfig
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' :: Maybe TuningJobCompletionCriteria
-> Maybe ParameterRanges
-> Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig
HyperParameterTuningJobConfig'
{ $sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria =
Maybe TuningJobCompletionCriteria
forall a. Maybe a
Prelude.Nothing,
$sel:parameterRanges:HyperParameterTuningJobConfig' :: Maybe ParameterRanges
parameterRanges = Maybe ParameterRanges
forall a. Maybe a
Prelude.Nothing,
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: Maybe HyperParameterTuningJobObjective
hyperParameterTuningJobObjective =
Maybe HyperParameterTuningJobObjective
forall a. Maybe a
Prelude.Nothing,
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType =
Maybe TrainingJobEarlyStoppingType
forall a. Maybe a
Prelude.Nothing,
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobStrategyType
strategy = HyperParameterTuningJobStrategyType
pStrategy_,
$sel:resourceLimits:HyperParameterTuningJobConfig' :: ResourceLimits
resourceLimits = ResourceLimits
pResourceLimits_
}
hyperParameterTuningJobConfig_tuningJobCompletionCriteria :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe TuningJobCompletionCriteria)
hyperParameterTuningJobConfig_tuningJobCompletionCriteria :: (Maybe TuningJobCompletionCriteria
-> f (Maybe TuningJobCompletionCriteria))
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_tuningJobCompletionCriteria = (HyperParameterTuningJobConfig
-> Maybe TuningJobCompletionCriteria)
-> (HyperParameterTuningJobConfig
-> Maybe TuningJobCompletionCriteria
-> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
(Maybe TuningJobCompletionCriteria)
(Maybe 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_parameterRanges :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe ParameterRanges)
hyperParameterTuningJobConfig_parameterRanges :: (Maybe ParameterRanges -> f (Maybe ParameterRanges))
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_parameterRanges = (HyperParameterTuningJobConfig -> Maybe ParameterRanges)
-> (HyperParameterTuningJobConfig
-> Maybe ParameterRanges -> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
(Maybe ParameterRanges)
(Maybe 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_hyperParameterTuningJobObjective :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe HyperParameterTuningJobObjective)
hyperParameterTuningJobConfig_hyperParameterTuningJobObjective :: (Maybe HyperParameterTuningJobObjective
-> f (Maybe HyperParameterTuningJobObjective))
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_hyperParameterTuningJobObjective = (HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective)
-> (HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
-> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
(Maybe HyperParameterTuningJobObjective)
(Maybe 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_trainingJobEarlyStoppingType :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe TrainingJobEarlyStoppingType)
hyperParameterTuningJobConfig_trainingJobEarlyStoppingType :: (Maybe TrainingJobEarlyStoppingType
-> f (Maybe TrainingJobEarlyStoppingType))
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_trainingJobEarlyStoppingType = (HyperParameterTuningJobConfig
-> Maybe TrainingJobEarlyStoppingType)
-> (HyperParameterTuningJobConfig
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
(Maybe TrainingJobEarlyStoppingType)
(Maybe 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_strategy :: Lens.Lens' HyperParameterTuningJobConfig HyperParameterTuningJobStrategyType
hyperParameterTuningJobConfig_strategy :: (HyperParameterTuningJobStrategyType
-> f HyperParameterTuningJobStrategyType)
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_strategy = (HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType)
-> (HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
-> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
HyperParameterTuningJobStrategyType
HyperParameterTuningJobStrategyType
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 :: (ResourceLimits -> f ResourceLimits)
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_resourceLimits = (HyperParameterTuningJobConfig -> ResourceLimits)
-> (HyperParameterTuningJobConfig
-> ResourceLimits -> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
ResourceLimits
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 Core.FromJSON HyperParameterTuningJobConfig where
parseJSON :: Value -> Parser HyperParameterTuningJobConfig
parseJSON =
String
-> (Object -> Parser HyperParameterTuningJobConfig)
-> Value
-> Parser HyperParameterTuningJobConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HyperParameterTuningJobConfig"
( \Object
x ->
Maybe TuningJobCompletionCriteria
-> Maybe ParameterRanges
-> Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig
HyperParameterTuningJobConfig'
(Maybe TuningJobCompletionCriteria
-> Maybe ParameterRanges
-> Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
-> Parser (Maybe TuningJobCompletionCriteria)
-> Parser
(Maybe ParameterRanges
-> Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TuningJobCompletionCriteria)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TuningJobCompletionCriteria")
Parser
(Maybe ParameterRanges
-> Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
-> Parser (Maybe ParameterRanges)
-> Parser
(Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
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
"ParameterRanges")
Parser
(Maybe HyperParameterTuningJobObjective
-> Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
-> Parser (Maybe HyperParameterTuningJobObjective)
-> Parser
(Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
forall (f :: * -> *) a b. Applicative f => 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
"HyperParameterTuningJobObjective")
Parser
(Maybe TrainingJobEarlyStoppingType
-> HyperParameterTuningJobStrategyType
-> ResourceLimits
-> HyperParameterTuningJobConfig)
-> Parser (Maybe TrainingJobEarlyStoppingType)
-> Parser
(HyperParameterTuningJobStrategyType
-> ResourceLimits -> HyperParameterTuningJobConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrainingJobEarlyStoppingType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingJobEarlyStoppingType")
Parser
(HyperParameterTuningJobStrategyType
-> ResourceLimits -> HyperParameterTuningJobConfig)
-> Parser HyperParameterTuningJobStrategyType
-> Parser (ResourceLimits -> HyperParameterTuningJobConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser HyperParameterTuningJobStrategyType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Strategy")
Parser (ResourceLimits -> HyperParameterTuningJobConfig)
-> Parser ResourceLimits -> Parser HyperParameterTuningJobConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceLimits
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceLimits")
)
instance
Prelude.Hashable
HyperParameterTuningJobConfig
instance Prelude.NFData HyperParameterTuningJobConfig
instance Core.ToJSON HyperParameterTuningJobConfig where
toJSON :: HyperParameterTuningJobConfig -> Value
toJSON HyperParameterTuningJobConfig' {Maybe HyperParameterTuningJobObjective
Maybe ParameterRanges
Maybe TrainingJobEarlyStoppingType
Maybe TuningJobCompletionCriteria
HyperParameterTuningJobStrategyType
ResourceLimits
resourceLimits :: ResourceLimits
strategy :: HyperParameterTuningJobStrategyType
trainingJobEarlyStoppingType :: Maybe TrainingJobEarlyStoppingType
hyperParameterTuningJobObjective :: Maybe HyperParameterTuningJobObjective
parameterRanges :: Maybe ParameterRanges
tuningJobCompletionCriteria :: Maybe TuningJobCompletionCriteria
$sel:resourceLimits:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> ResourceLimits
$sel:strategy:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobStrategyType
$sel:trainingJobEarlyStoppingType:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TrainingJobEarlyStoppingType
$sel:hyperParameterTuningJobObjective:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig
-> Maybe HyperParameterTuningJobObjective
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
$sel:tuningJobCompletionCriteria:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe TuningJobCompletionCriteria
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TuningJobCompletionCriteria" Text -> TuningJobCompletionCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TuningJobCompletionCriteria -> Pair)
-> Maybe TuningJobCompletionCriteria -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TuningJobCompletionCriteria
tuningJobCompletionCriteria,
(Text
"ParameterRanges" 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
parameterRanges,
(Text
"HyperParameterTuningJobObjective" 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
hyperParameterTuningJobObjective,
(Text
"TrainingJobEarlyStoppingType" Text -> TrainingJobEarlyStoppingType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TrainingJobEarlyStoppingType -> Pair)
-> Maybe TrainingJobEarlyStoppingType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrainingJobEarlyStoppingType
trainingJobEarlyStoppingType,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Strategy" Text -> HyperParameterTuningJobStrategyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HyperParameterTuningJobStrategyType
strategy),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ResourceLimits" Text -> ResourceLimits -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ResourceLimits
resourceLimits)
]
)