{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.HyperParameterTrainingJobSummary 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.FinalHyperParameterTuningJobObjectiveMetric
import Amazonka.SageMaker.Types.ObjectiveStatus
import Amazonka.SageMaker.Types.TrainingJobStatus

-- | The container for the 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 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 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,
    -- | 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 SageMaker detects a job failure.
    HyperParameterTrainingJobSummary -> Maybe POSIX
trainingEndTime :: Prelude.Maybe Data.POSIX,
    -- | 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 Data.POSIX,
    -- | The HyperParameter tuning job that launched the training job.
    HyperParameterTrainingJobSummary -> Maybe Text
tuningJobName :: Prelude.Maybe Prelude.Text,
    -- | 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 :: Data.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
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]
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
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.
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.
--
-- 'finalHyperParameterTuningJobObjectiveMetric', 'hyperParameterTrainingJobSummary_finalHyperParameterTuningJobObjectiveMetric' - The FinalHyperParameterTuningJobObjectiveMetric object that specifies
-- the value of the objective metric of the tuning job that launched this
-- training job.
--
-- '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.
--
-- '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 SageMaker detects a job failure.
--
-- 'trainingJobDefinitionName', 'hyperParameterTrainingJobSummary_trainingJobDefinitionName' - The training job definition name.
--
-- 'trainingStartTime', 'hyperParameterTrainingJobSummary_trainingStartTime' - The date and time that the training job started.
--
-- 'tuningJobName', 'hyperParameterTrainingJobSummary_tuningJobName' - The HyperParameter tuning job that launched the 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'
      { $sel:failureReason:HyperParameterTrainingJobSummary' :: Maybe Text
failureReason =
          forall a. Maybe a
Prelude.Nothing,
        $sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric =
          forall a. Maybe a
Prelude.Nothing,
        $sel:objectiveStatus:HyperParameterTrainingJobSummary' :: Maybe ObjectiveStatus
objectiveStatus = forall a. Maybe a
Prelude.Nothing,
        $sel:trainingEndTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingEndTime = forall a. Maybe a
Prelude.Nothing,
        $sel:trainingJobDefinitionName:HyperParameterTrainingJobSummary' :: Maybe Text
trainingJobDefinitionName =
          forall a. Maybe a
Prelude.Nothing,
        $sel:trainingStartTime:HyperParameterTrainingJobSummary' :: Maybe POSIX
trainingStartTime = forall a. Maybe a
Prelude.Nothing,
        $sel:tuningJobName:HyperParameterTrainingJobSummary' :: Maybe Text
tuningJobName = 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 =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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 = 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 :: Lens' HyperParameterTrainingJobSummary (Maybe Text)
hyperParameterTrainingJobSummary_failureReason = 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 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 :: Lens'
  HyperParameterTrainingJobSummary
  (Maybe FinalHyperParameterTuningJobObjectiveMetric)
hyperParameterTrainingJobSummary_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 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 :: Lens' HyperParameterTrainingJobSummary (Maybe ObjectiveStatus)
hyperParameterTrainingJobSummary_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)

-- | 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 SageMaker detects a job failure.
hyperParameterTrainingJobSummary_trainingEndTime :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.UTCTime)
hyperParameterTrainingJobSummary_trainingEndTime :: Lens' HyperParameterTrainingJobSummary (Maybe UTCTime)
hyperParameterTrainingJobSummary_trainingEndTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The training job definition name.
hyperParameterTrainingJobSummary_trainingJobDefinitionName :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.Text)
hyperParameterTrainingJobSummary_trainingJobDefinitionName :: Lens' HyperParameterTrainingJobSummary (Maybe Text)
hyperParameterTrainingJobSummary_trainingJobDefinitionName = 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 :: Lens' HyperParameterTrainingJobSummary (Maybe UTCTime)
hyperParameterTrainingJobSummary_trainingStartTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The HyperParameter tuning job that launched the training job.
hyperParameterTrainingJobSummary_tuningJobName :: Lens.Lens' HyperParameterTrainingJobSummary (Prelude.Maybe Prelude.Text)
hyperParameterTrainingJobSummary_tuningJobName :: Lens' HyperParameterTrainingJobSummary (Maybe Text)
hyperParameterTrainingJobSummary_tuningJobName = 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)

-- | The name of the training job.
hyperParameterTrainingJobSummary_trainingJobName :: Lens.Lens' HyperParameterTrainingJobSummary Prelude.Text
hyperParameterTrainingJobSummary_trainingJobName :: Lens' HyperParameterTrainingJobSummary Text
hyperParameterTrainingJobSummary_trainingJobName = 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 :: Lens' HyperParameterTrainingJobSummary Text
hyperParameterTrainingJobSummary_trainingJobArn = 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 :: Lens' HyperParameterTrainingJobSummary UTCTime
hyperParameterTrainingJobSummary_creationTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The status of the training job.
hyperParameterTrainingJobSummary_trainingJobStatus :: Lens.Lens' HyperParameterTrainingJobSummary TrainingJobStatus
hyperParameterTrainingJobSummary_trainingJobStatus :: Lens' HyperParameterTrainingJobSummary TrainingJobStatus
hyperParameterTrainingJobSummary_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 :: Lens' HyperParameterTrainingJobSummary (HashMap Text Text)
hyperParameterTrainingJobSummary_tunedHyperParameters = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.Hashable
    HyperParameterTrainingJobSummary
  where
  hashWithSalt :: Int -> HyperParameterTrainingJobSummary -> Int
hashWithSalt
    Int
_salt
    HyperParameterTrainingJobSummary' {Maybe Text
Maybe POSIX
Maybe FinalHyperParameterTuningJobObjectiveMetric
Maybe ObjectiveStatus
Text
HashMap Text Text
POSIX
TrainingJobStatus
tunedHyperParameters :: HashMap Text Text
trainingJobStatus :: TrainingJobStatus
creationTime :: POSIX
trainingJobArn :: Text
trainingJobName :: Text
tuningJobName :: Maybe Text
trainingStartTime :: Maybe POSIX
trainingJobDefinitionName :: Maybe Text
trainingEndTime :: Maybe POSIX
objectiveStatus :: Maybe ObjectiveStatus
finalHyperParameterTuningJobObjectiveMetric :: Maybe FinalHyperParameterTuningJobObjectiveMetric
failureReason :: Maybe Text
$sel:tunedHyperParameters:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> HashMap Text Text
$sel:trainingJobStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> TrainingJobStatus
$sel:creationTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> POSIX
$sel:trainingJobArn:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
$sel:trainingJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
$sel:tuningJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
$sel:trainingStartTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
$sel:trainingJobDefinitionName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
$sel:trainingEndTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
$sel:objectiveStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe ObjectiveStatus
$sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
$sel:failureReason:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureReason
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObjectiveStatus
objectiveStatus
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
trainingEndTime
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trainingJobDefinitionName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
trainingStartTime
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tuningJobName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trainingJobName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trainingJobArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TrainingJobStatus
trainingJobStatus
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text Text
tunedHyperParameters

instance
  Prelude.NFData
    HyperParameterTrainingJobSummary
  where
  rnf :: HyperParameterTrainingJobSummary -> ()
rnf HyperParameterTrainingJobSummary' {Maybe Text
Maybe POSIX
Maybe FinalHyperParameterTuningJobObjectiveMetric
Maybe ObjectiveStatus
Text
HashMap Text Text
POSIX
TrainingJobStatus
tunedHyperParameters :: HashMap Text Text
trainingJobStatus :: TrainingJobStatus
creationTime :: POSIX
trainingJobArn :: Text
trainingJobName :: Text
tuningJobName :: Maybe Text
trainingStartTime :: Maybe POSIX
trainingJobDefinitionName :: Maybe Text
trainingEndTime :: Maybe POSIX
objectiveStatus :: Maybe ObjectiveStatus
finalHyperParameterTuningJobObjectiveMetric :: Maybe FinalHyperParameterTuningJobObjectiveMetric
failureReason :: Maybe Text
$sel:tunedHyperParameters:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> HashMap Text Text
$sel:trainingJobStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> TrainingJobStatus
$sel:creationTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> POSIX
$sel:trainingJobArn:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
$sel:trainingJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Text
$sel:tuningJobName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
$sel:trainingStartTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
$sel:trainingJobDefinitionName:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
$sel:trainingEndTime:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe POSIX
$sel:objectiveStatus:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe ObjectiveStatus
$sel:finalHyperParameterTuningJobObjectiveMetric:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary
-> Maybe FinalHyperParameterTuningJobObjectiveMetric
$sel:failureReason:HyperParameterTrainingJobSummary' :: HyperParameterTrainingJobSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe FinalHyperParameterTuningJobObjectiveMetric
finalHyperParameterTuningJobObjectiveMetric
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObjectiveStatus
objectiveStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
trainingEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trainingJobDefinitionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
trainingStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tuningJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trainingJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trainingJobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TrainingJobStatus
trainingJobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text Text
tunedHyperParameters