{-# 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.HyperParameterTrainingJobSummary
-- 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.HyperParameterTrainingJobSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.FinalHyperParameterTuningJobObjectiveMetric
import Amazonka.SageMaker.Types.ObjectiveStatus
import Amazonka.SageMaker.Types.TrainingJobStatus

-- | Specifies summary information about a training job.
--
-- /See:/ 'newHyperParameterTrainingJobSummary' smart constructor.
data HyperParameterTrainingJobSummary = HyperParameterTrainingJobSummary'
  { -- | The reason that the training job failed.
    HyperParameterTrainingJobSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The HyperParameter tuning job that launched the training job.
    HyperParameterTrainingJobSummary -> Maybe Text
tuningJobName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the time when the training job ends on training instances. You
    -- are billed for the time interval between the value of
    -- @TrainingStartTime@ and this time. For successful jobs and stopped jobs,
    -- this is the time after model artifacts are uploaded. For failed jobs,
    -- this is the time when Amazon SageMaker detects a job failure.
    HyperParameterTrainingJobSummary -> Maybe POSIX
trainingEndTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the objective metric for the training job:
    --
    -- -   Succeeded: The final objective metric for the training job was
    --     evaluated by the hyperparameter tuning job and used in the
    --     hyperparameter tuning process.
    --
    -- -   Pending: The training job is in progress and evaluation of its final
    --     objective metric is pending.
    --
    -- -   Failed: The final objective metric for the training job was not
    --     evaluated, and was not used in the hyperparameter tuning process.
    --     This typically occurs when the training job failed or did not emit
    --     an objective metric.
    HyperParameterTrainingJobSummary -> Maybe ObjectiveStatus
objectiveStatus :: Prelude.Maybe ObjectiveStatus,
    -- | The training job definition name.
    HyperParameterTrainingJobSummary -> Maybe Text
trainingJobDefinitionName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the training job started.
    HyperParameterTrainingJobSummary -> Maybe POSIX
trainingStartTime :: Prelude.Maybe Core.POSIX,
    -- | The FinalHyperParameterTuningJobObjectiveMetric object that specifies
    -- the value of the objective metric of the tuning job that launched this
    -- training job.
    HyperParameterTrainingJobSummary
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric :: Prelude.Maybe FinalHyperParameterTuningJobObjectiveMetric,
    -- | The name of the training job.
    HyperParameterTrainingJobSummary -> Text
trainingJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the training job.
    HyperParameterTrainingJobSummary -> Text
trainingJobArn :: Prelude.Text,
    -- | The date and time that the training job was created.
    HyperParameterTrainingJobSummary -> POSIX
creationTime :: Core.POSIX,
    -- | The status of the training job.
    HyperParameterTrainingJobSummary -> TrainingJobStatus
trainingJobStatus :: TrainingJobStatus,
    -- | A list of the hyperparameters for which you specified ranges to search.
    HyperParameterTrainingJobSummary -> HashMap Text Text
tunedHyperParameters :: Prelude.HashMap Prelude.Text Prelude.Text
  }
  deriving (HyperParameterTrainingJobSummary
-> HyperParameterTrainingJobSummary -> Bool
(HyperParameterTrainingJobSummary
 -> HyperParameterTrainingJobSummary -> Bool)
-> (HyperParameterTrainingJobSummary
    -> HyperParameterTrainingJobSummary -> Bool)
-> Eq HyperParameterTrainingJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HyperParameterTrainingJobSummary
-> HyperParameterTrainingJobSummary -> Bool
$c/= :: HyperParameterTrainingJobSummary
-> HyperParameterTrainingJobSummary -> Bool
== :: HyperParameterTrainingJobSummary
-> HyperParameterTrainingJobSummary -> Bool
$c== :: HyperParameterTrainingJobSummary
-> HyperParameterTrainingJobSummary -> Bool
Prelude.Eq, ReadPrec [HyperParameterTrainingJobSummary]
ReadPrec HyperParameterTrainingJobSummary
Int -> ReadS HyperParameterTrainingJobSummary
ReadS [HyperParameterTrainingJobSummary]
(Int -> ReadS HyperParameterTrainingJobSummary)
-> ReadS [HyperParameterTrainingJobSummary]
-> ReadPrec HyperParameterTrainingJobSummary
-> ReadPrec [HyperParameterTrainingJobSummary]
-> Read HyperParameterTrainingJobSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HyperParameterTrainingJobSummary]
$creadListPrec :: ReadPrec [HyperParameterTrainingJobSummary]
readPrec :: ReadPrec HyperParameterTrainingJobSummary
$creadPrec :: ReadPrec HyperParameterTrainingJobSummary
readList :: ReadS [HyperParameterTrainingJobSummary]
$creadList :: ReadS [HyperParameterTrainingJobSummary]
readsPrec :: Int -> ReadS HyperParameterTrainingJobSummary
$creadsPrec :: Int -> ReadS HyperParameterTrainingJobSummary
Prelude.Read, Int -> HyperParameterTrainingJobSummary -> ShowS
[HyperParameterTrainingJobSummary] -> ShowS
HyperParameterTrainingJobSummary -> String
(Int -> HyperParameterTrainingJobSummary -> ShowS)
-> (HyperParameterTrainingJobSummary -> String)
-> ([HyperParameterTrainingJobSummary] -> ShowS)
-> Show HyperParameterTrainingJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HyperParameterTrainingJobSummary] -> ShowS
$cshowList :: [HyperParameterTrainingJobSummary] -> ShowS
show :: HyperParameterTrainingJobSummary -> String
$cshow :: HyperParameterTrainingJobSummary -> String
showsPrec :: Int -> HyperParameterTrainingJobSummary -> ShowS
$cshowsPrec :: Int -> HyperParameterTrainingJobSummary -> ShowS
Prelude.Show, (forall x.
 HyperParameterTrainingJobSummary
 -> Rep HyperParameterTrainingJobSummary x)
-> (forall x.
    Rep HyperParameterTrainingJobSummary x
    -> HyperParameterTrainingJobSummary)
-> Generic HyperParameterTrainingJobSummary
forall x.
Rep HyperParameterTrainingJobSummary x
-> HyperParameterTrainingJobSummary
forall x.
HyperParameterTrainingJobSummary
-> Rep HyperParameterTrainingJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HyperParameterTrainingJobSummary x
-> HyperParameterTrainingJobSummary
$cfrom :: forall x.
HyperParameterTrainingJobSummary
-> Rep HyperParameterTrainingJobSummary x
Prelude.Generic)

-- |
-- Create a value of 'HyperParameterTrainingJobSummary' 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:
--
-- 'failureReason', 'hyperParameterTrainingJobSummary_failureReason' - The reason that the training job failed.
--
-- 'tuningJobName', 'hyperParameterTrainingJobSummary_tuningJobName' - The HyperParameter tuning job that launched the training job.
--
-- 'trainingEndTime', 'hyperParameterTrainingJobSummary_trainingEndTime' - Specifies the time when the training job ends on training instances. You
-- are billed for the time interval between the value of
-- @TrainingStartTime@ and this time. For successful jobs and stopped jobs,
-- this is the time after model artifacts are uploaded. For failed jobs,
-- this is the time when Amazon SageMaker detects a job failure.
--
-- 'objectiveStatus', 'hyperParameterTrainingJobSummary_objectiveStatus' - The status of the objective metric for the training job:
--
-- -   Succeeded: The final objective metric for the training job was
--     evaluated by the hyperparameter tuning job and used in the
--     hyperparameter tuning process.
--
-- -   Pending: The training job is in progress and evaluation of its final
--     objective metric is pending.
--
-- -   Failed: The final objective metric for the training job was not
--     evaluated, and was not used in the hyperparameter tuning process.
--     This typically occurs when the training job failed or did not emit
--     an objective metric.
--
-- 'trainingJobDefinitionName', 'hyperParameterTrainingJobSummary_trainingJobDefinitionName' - The training job definition name.
--
-- 'trainingStartTime', 'hyperParameterTrainingJobSummary_trainingStartTime' - The date and time that the training job started.
--
-- 'finalHyperParameterTuningJobObjectiveMetric', 'hyperParameterTrainingJobSummary_finalHyperParameterTuningJobObjectiveMetric' - The FinalHyperParameterTuningJobObjectiveMetric object that specifies
-- the value of the objective metric of the tuning job that launched this
-- training job.
--
-- 'trainingJobName', 'hyperParameterTrainingJobSummary_trainingJobName' - The name of the training job.
--
-- 'trainingJobArn', 'hyperParameterTrainingJobSummary_trainingJobArn' - The Amazon Resource Name (ARN) of the training job.
--
-- 'creationTime', 'hyperParameterTrainingJobSummary_creationTime' - The date and time that the training job was created.
--
-- 'trainingJobStatus', 'hyperParameterTrainingJobSummary_trainingJobStatus' - The status of the training job.
--
-- 'tunedHyperParameters', 'hyperParameterTrainingJobSummary_tunedHyperParameters' - A list of the hyperparameters for which you specified ranges to search.
newHyperParameterTrainingJobSummary ::
  -- | 'trainingJobName'
  Prelude.Text ->
  -- | 'trainingJobArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'trainingJobStatus'
  TrainingJobStatus ->
  HyperParameterTrainingJobSummary
newHyperParameterTrainingJobSummary :: Text
-> Text
-> UTCTime
-> TrainingJobStatus
-> HyperParameterTrainingJobSummary
newHyperParameterTrainingJobSummary
  Text
pTrainingJobName_
  Text
pTrainingJobArn_
  UTCTime
pCreationTime_
  TrainingJobStatus
pTrainingJobStatus_ =
    HyperParameterTrainingJobSummary' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ObjectiveStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
-> Text
-> Text
-> POSIX
-> TrainingJobStatus
-> HashMap Text Text
-> HyperParameterTrainingJobSummary
HyperParameterTrainingJobSummary'
      { $sel:failureReason:HyperParameterTrainingJobSummary' :: Maybe Text
failureReason =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tuningJobName:HyperParameterTrainingJobSummary' :: Maybe Text
tuningJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:trainingEndTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:objectiveStatus:HyperParameterTrainingJobSummary' :: Maybe ObjectiveStatus
objectiveStatus = Maybe ObjectiveStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:trainingJobDefinitionName:HyperParameterTrainingJobSummary' :: Maybe Text
trainingJobDefinitionName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:trainingStartTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric =
          Maybe FinalHyperParameterTuningJobObjectiveMetric
forall a. Maybe a
Prelude.Nothing,
        $sel:trainingJobName:HyperParameterTrainingJobSummary' :: Text
trainingJobName = Text
pTrainingJobName_,
        $sel:trainingJobArn:HyperParameterTrainingJobSummary' :: Text
trainingJobArn = Text
pTrainingJobArn_,
        $sel:creationTime:HyperParameterTrainingJobSummary' :: POSIX
creationTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:trainingJobStatus:HyperParameterTrainingJobSummary' :: TrainingJobStatus
trainingJobStatus = TrainingJobStatus
pTrainingJobStatus_,
        $sel:tunedHyperParameters:HyperParameterTrainingJobSummary' :: HashMap Text Text
tunedHyperParameters = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
      }

-- | The reason that the training job failed.
hyperParameterTrainingJobSummary_failureReason :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.Text)
hyperParameterTrainingJobSummary_failureReason :: (Maybe Text -> f (Maybe Text))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_failureReason = (HyperParameterTrainingJobSummary -> Maybe Text)
-> (HyperParameterTrainingJobSummary
    -> Maybe Text -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe Text
a -> HyperParameterTrainingJobSummary
s {$sel:failureReason:HyperParameterTrainingJobSummary' :: Maybe Text
failureReason = Maybe Text
a} :: HyperParameterTrainingJobSummary)

-- | The HyperParameter tuning job that launched the training job.
hyperParameterTrainingJobSummary_tuningJobName :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.Text)
hyperParameterTrainingJobSummary_tuningJobName :: (Maybe Text -> f (Maybe Text))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_tuningJobName = (HyperParameterTrainingJobSummary -> Maybe Text)
-> (HyperParameterTrainingJobSummary
    -> Maybe Text -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe Text
tuningJobName :: Maybe Text
$sel:tuningJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
tuningJobName} -> Maybe Text
tuningJobName) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe Text
a -> HyperParameterTrainingJobSummary
s {$sel:tuningJobName:HyperParameterTrainingJobSummary' :: Maybe Text
tuningJobName = Maybe Text
a} :: HyperParameterTrainingJobSummary)

-- | Specifies the time when the training job ends on training instances. You
-- are billed for the time interval between the value of
-- @TrainingStartTime@ and this time. For successful jobs and stopped jobs,
-- this is the time after model artifacts are uploaded. For failed jobs,
-- this is the time when Amazon SageMaker detects a job failure.
hyperParameterTrainingJobSummary_trainingEndTime :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.UTCTime)
hyperParameterTrainingJobSummary_trainingEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_trainingEndTime = (HyperParameterTrainingJobSummary -> Maybe POSIX)
-> (HyperParameterTrainingJobSummary
    -> Maybe POSIX -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe POSIX
trainingEndTime :: Maybe POSIX
$sel:trainingEndTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
trainingEndTime} -> Maybe POSIX
trainingEndTime) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe POSIX
a -> HyperParameterTrainingJobSummary
s {$sel:trainingEndTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingEndTime = Maybe POSIX
a} :: HyperParameterTrainingJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> HyperParameterTrainingJobSummary
 -> f HyperParameterTrainingJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the objective metric for the training job:
--
-- -   Succeeded: The final objective metric for the training job was
--     evaluated by the hyperparameter tuning job and used in the
--     hyperparameter tuning process.
--
-- -   Pending: The training job is in progress and evaluation of its final
--     objective metric is pending.
--
-- -   Failed: The final objective metric for the training job was not
--     evaluated, and was not used in the hyperparameter tuning process.
--     This typically occurs when the training job failed or did not emit
--     an objective metric.
hyperParameterTrainingJobSummary_objectiveStatus :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe ObjectiveStatus)
hyperParameterTrainingJobSummary_objectiveStatus :: (Maybe ObjectiveStatus -> f (Maybe ObjectiveStatus))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_objectiveStatus = (HyperParameterTrainingJobSummary -> Maybe ObjectiveStatus)
-> (HyperParameterTrainingJobSummary
    -> Maybe ObjectiveStatus -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe ObjectiveStatus)
     (Maybe ObjectiveStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe ObjectiveStatus
objectiveStatus :: Maybe ObjectiveStatus
$sel:objectiveStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe ObjectiveStatus
objectiveStatus} -> Maybe ObjectiveStatus
objectiveStatus) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe ObjectiveStatus
a -> HyperParameterTrainingJobSummary
s {$sel:objectiveStatus:HyperParameterTrainingJobSummary' :: Maybe ObjectiveStatus
objectiveStatus = Maybe ObjectiveStatus
a} :: HyperParameterTrainingJobSummary)

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

-- | The date and time that the training job started.
hyperParameterTrainingJobSummary_trainingStartTime :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.UTCTime)
hyperParameterTrainingJobSummary_trainingStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_trainingStartTime = (HyperParameterTrainingJobSummary -> Maybe POSIX)
-> (HyperParameterTrainingJobSummary
    -> Maybe POSIX -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe POSIX
trainingStartTime :: Maybe POSIX
$sel:trainingStartTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
trainingStartTime} -> Maybe POSIX
trainingStartTime) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe POSIX
a -> HyperParameterTrainingJobSummary
s {$sel:trainingStartTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingStartTime = Maybe POSIX
a} :: HyperParameterTrainingJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> HyperParameterTrainingJobSummary
 -> f HyperParameterTrainingJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The FinalHyperParameterTuningJobObjectiveMetric object that specifies
-- the value of the objective metric of the tuning job that launched this
-- training job.
hyperParameterTrainingJobSummary_finalHyperParameterTuningJobObjectiveMetric :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe FinalHyperParameterTuningJobObjectiveMetric)
hyperParameterTrainingJobSummary_finalHyperParameterTuningJobObjectiveMetric :: (Maybe FinalHyperParameterTuningJobObjectiveMetric
 -> f (Maybe FinalHyperParameterTuningJobObjectiveMetric))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_finalHyperParameterTuningJobObjectiveMetric = (HyperParameterTrainingJobSummary
 -> Maybe FinalHyperParameterTuningJobObjectiveMetric)
-> (HyperParameterTrainingJobSummary
    -> Maybe FinalHyperParameterTuningJobObjectiveMetric
    -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (Maybe FinalHyperParameterTuningJobObjectiveMetric)
     (Maybe FinalHyperParameterTuningJobObjectiveMetric)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric :: Maybe FinalHyperParameterTuningJobObjectiveMetric
$sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric} -> Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Maybe FinalHyperParameterTuningJobObjectiveMetric
a -> HyperParameterTrainingJobSummary
s {$sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric = Maybe FinalHyperParameterTuningJobObjectiveMetric
a} :: HyperParameterTrainingJobSummary)

-- | The name of the training job.
hyperParameterTrainingJobSummary_trainingJobName :: Lens.Lens' HyperParameterTrainingJobSummary Prelude.Text
hyperParameterTrainingJobSummary_trainingJobName :: (Text -> f Text)
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_trainingJobName = (HyperParameterTrainingJobSummary -> Text)
-> (HyperParameterTrainingJobSummary
    -> Text -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Text
trainingJobName :: Text
$sel:trainingJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
trainingJobName} -> Text
trainingJobName) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Text
a -> HyperParameterTrainingJobSummary
s {$sel:trainingJobName:HyperParameterTrainingJobSummary' :: Text
trainingJobName = Text
a} :: HyperParameterTrainingJobSummary)

-- | The Amazon Resource Name (ARN) of the training job.
hyperParameterTrainingJobSummary_trainingJobArn :: Lens.Lens' HyperParameterTrainingJobSummary Prelude.Text
hyperParameterTrainingJobSummary_trainingJobArn :: (Text -> f Text)
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_trainingJobArn = (HyperParameterTrainingJobSummary -> Text)
-> (HyperParameterTrainingJobSummary
    -> Text -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {Text
trainingJobArn :: Text
$sel:trainingJobArn:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
trainingJobArn} -> Text
trainingJobArn) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} Text
a -> HyperParameterTrainingJobSummary
s {$sel:trainingJobArn:HyperParameterTrainingJobSummary' :: Text
trainingJobArn = Text
a} :: HyperParameterTrainingJobSummary)

-- | The date and time that the training job was created.
hyperParameterTrainingJobSummary_creationTime :: Lens.Lens' HyperParameterTrainingJobSummary Prelude.UTCTime
hyperParameterTrainingJobSummary_creationTime :: (UTCTime -> f UTCTime)
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_creationTime = (HyperParameterTrainingJobSummary -> POSIX)
-> (HyperParameterTrainingJobSummary
    -> POSIX -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} POSIX
a -> HyperParameterTrainingJobSummary
s {$sel:creationTime:HyperParameterTrainingJobSummary' :: POSIX
creationTime = POSIX
a} :: HyperParameterTrainingJobSummary) ((POSIX -> f POSIX)
 -> HyperParameterTrainingJobSummary
 -> f HyperParameterTrainingJobSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the training job.
hyperParameterTrainingJobSummary_trainingJobStatus :: Lens.Lens' HyperParameterTrainingJobSummary TrainingJobStatus
hyperParameterTrainingJobSummary_trainingJobStatus :: (TrainingJobStatus -> f TrainingJobStatus)
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_trainingJobStatus = (HyperParameterTrainingJobSummary -> TrainingJobStatus)
-> (HyperParameterTrainingJobSummary
    -> TrainingJobStatus -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     TrainingJobStatus
     TrainingJobStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {TrainingJobStatus
trainingJobStatus :: TrainingJobStatus
$sel:trainingJobStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> TrainingJobStatus
trainingJobStatus} -> TrainingJobStatus
trainingJobStatus) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} TrainingJobStatus
a -> HyperParameterTrainingJobSummary
s {$sel:trainingJobStatus:HyperParameterTrainingJobSummary' :: TrainingJobStatus
trainingJobStatus = TrainingJobStatus
a} :: HyperParameterTrainingJobSummary)

-- | A list of the hyperparameters for which you specified ranges to search.
hyperParameterTrainingJobSummary_tunedHyperParameters :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.HashMap Prelude.Text Prelude.Text)
hyperParameterTrainingJobSummary_tunedHyperParameters :: (HashMap Text Text -> f (HashMap Text Text))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
hyperParameterTrainingJobSummary_tunedHyperParameters = (HyperParameterTrainingJobSummary -> HashMap Text Text)
-> (HyperParameterTrainingJobSummary
    -> HashMap Text Text -> HyperParameterTrainingJobSummary)
-> Lens
     HyperParameterTrainingJobSummary
     HyperParameterTrainingJobSummary
     (HashMap Text Text)
     (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTrainingJobSummary' {HashMap Text Text
tunedHyperParameters :: HashMap Text Text
$sel:tunedHyperParameters:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> HashMap Text Text
tunedHyperParameters} -> HashMap Text Text
tunedHyperParameters) (\s :: HyperParameterTrainingJobSummary
s@HyperParameterTrainingJobSummary' {} HashMap Text Text
a -> HyperParameterTrainingJobSummary
s {$sel:tunedHyperParameters:HyperParameterTrainingJobSummary' :: HashMap Text Text
tunedHyperParameters = HashMap Text Text
a} :: HyperParameterTrainingJobSummary) ((HashMap Text Text -> f (HashMap Text Text))
 -> HyperParameterTrainingJobSummary
 -> f HyperParameterTrainingJobSummary)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> HyperParameterTrainingJobSummary
-> f HyperParameterTrainingJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    HyperParameterTrainingJobSummary
  where
  parseJSON :: Value -> Parser HyperParameterTrainingJobSummary
parseJSON =
    String
-> (Object -> Parser HyperParameterTrainingJobSummary)
-> Value
-> Parser HyperParameterTrainingJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HyperParameterTrainingJobSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ObjectiveStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
-> Text
-> Text
-> POSIX
-> TrainingJobStatus
-> HashMap Text Text
-> HyperParameterTrainingJobSummary
HyperParameterTrainingJobSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ObjectiveStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe FinalHyperParameterTuningJobObjectiveMetric
 -> Text
 -> Text
 -> POSIX
 -> TrainingJobStatus
 -> HashMap Text Text
 -> HyperParameterTrainingJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ObjectiveStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Functor 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
"FailureReason")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ObjectiveStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ObjectiveStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
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
"TuningJobName")
            Parser
  (Maybe POSIX
   -> Maybe ObjectiveStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ObjectiveStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingEndTime")
            Parser
  (Maybe ObjectiveStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe ObjectiveStatus)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ObjectiveStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ObjectiveStatus")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
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
"TrainingJobDefinitionName")
            Parser
  (Maybe POSIX
   -> Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe FinalHyperParameterTuningJobObjectiveMetric
      -> Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingStartTime")
            Parser
  (Maybe FinalHyperParameterTuningJobObjectiveMetric
   -> Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser (Maybe FinalHyperParameterTuningJobObjectiveMetric)
-> Parser
     (Text
      -> Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            Object
-> Text
-> Parser (Maybe FinalHyperParameterTuningJobObjectiveMetric)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FinalHyperParameterTuningJobObjectiveMetric"
                        )
            Parser
  (Text
   -> Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser Text
-> Parser
     (Text
      -> POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
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
"TrainingJobName")
            Parser
  (Text
   -> POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser Text
-> Parser
     (POSIX
      -> TrainingJobStatus
      -> HashMap Text Text
      -> HyperParameterTrainingJobSummary)
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
"TrainingJobArn")
            Parser
  (POSIX
   -> TrainingJobStatus
   -> HashMap Text Text
   -> HyperParameterTrainingJobSummary)
-> Parser POSIX
-> Parser
     (TrainingJobStatus
      -> HashMap Text Text -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
            Parser
  (TrainingJobStatus
   -> HashMap Text Text -> HyperParameterTrainingJobSummary)
-> Parser TrainingJobStatus
-> Parser (HashMap Text Text -> HyperParameterTrainingJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TrainingJobStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TrainingJobStatus")
            Parser (HashMap Text Text -> HyperParameterTrainingJobSummary)
-> Parser (HashMap Text Text)
-> Parser HyperParameterTrainingJobSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TunedHyperParameters"
                            Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    HyperParameterTrainingJobSummary

instance
  Prelude.NFData
    HyperParameterTrainingJobSummary