// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy;
import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings;
import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection;
import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection;
import com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase;
import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings;
import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode;
import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler;
import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput;
import com.azure.resourcemanager.machinelearning.models.MLTableJobInput;
import com.azure.resourcemanager.machinelearning.models.ModelSize;
import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType;
import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer;
import com.azure.resourcemanager.machinelearning.models.ValidationMetricType;
import java.time.Duration;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ImageObjectDetectionBaseTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ImageObjectDetectionBase model =
            BinaryData
                .fromString(
                    "{\"modelSettings\":{\"boxDetectionsPerImage\":220622186,\"boxScoreThreshold\":34.980453,\"imageSize\":1257411321,\"maxSize\":921466837,\"minSize\":2015686275,\"modelSize\":\"None\",\"multiScale\":false,\"nmsIouThreshold\":0.77554584,\"tileGridSize\":\"aohoqkpjtnq\",\"tileOverlapRatio\":5.6527376,\"tilePredictionsNmsThreshold\":62.38328,\"validationIouThreshold\":84.67642,\"validationMetricType\":\"None\",\"advancedSettings\":\"m\",\"amsGradient\":true,\"augmentations\":\"ilm\",\"beta1\":66.63753,\"beta2\":77.31098,\"checkpointFrequency\":1645404857,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"nkkbjpjvlywltmfw\",\"description\":\"bjwhlwyjfnqzocr\"},\"checkpointRunId\":\"gczeuntgx\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":1555790042,\"earlyStoppingPatience\":1557956860,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1852855933,\"gradientAccumulationStep\":1891446844,\"layersToFreeze\":888077010,\"learningRate\":91.16553,\"learningRateScheduler\":\"None\",\"modelName\":\"xgyrihlgmgbehlqt\",\"momentum\":35.669476,\"nesterov\":true,\"numberOfEpochs\":2104814940,\"numberOfWorkers\":2146718478,\"optimizer\":\"None\",\"randomSeed\":961397870,\"stepLRGamma\":84.43488,\"stepLRStepSize\":1159798592,\"trainingBatchSize\":1968957759,\"validationBatchSize\":1595039473,\"warmupCosineLRCycles\":26.42473,\"warmupCosineLRWarmupEpochs\":1300894444,\"weightDecay\":80.86428},\"searchSpace\":[{\"boxDetectionsPerImage\":\"gsabvcipowzafc\",\"boxScoreThreshold\":\"umljcirvpef\",\"imageSize\":\"dvei\",\"maxSize\":\"tjnsx\",\"minSize\":\"jlnsj\",\"modelSize\":\"ju\",\"multiScale\":\"xbxq\",\"nmsIouThreshold\":\"vuaytuad\",\"tileGridSize\":\"xeqbwp\",\"tileOverlapRatio\":\"ghyksarcdrnxs\",\"tilePredictionsNmsThreshold\":\"vlzladl\",\"validationIouThreshold\":\"kpbqhvfdqqjw\",\"validationMetricType\":\"hwzdanojisgglmv\",\"amsGradient\":\"atuztjct\",\"augmentations\":\"pvbkaehxsmzyg\",\"beta1\":\"wakwseivmakxhys\",\"beta2\":\"ljuxl\",\"distributed\":\"ect\",\"earlyStopping\":\"fjmskdchmaiu\",\"earlyStoppingDelay\":\"vlzw\",\"earlyStoppingPatience\":\"gmfalkzazmgoked\",\"enableOnnxNormalization\":\"qafkmkrokzrth\",\"evaluationFrequency\":\"twpqrtva\",\"gradientAccumulationStep\":\"nqnixiezeagmce\",\"layersToFreeze\":\"uugedhfp\",\"learningRate\":\"tlzm\",\"learningRateScheduler\":\"syjdeolctae\",\"modelName\":\"syrled\",\"momentum\":\"ustbvtqigdx\",\"nesterov\":\"sgeafgfosehx\",\"numberOfEpochs\":\"sxezppkkwaa\",\"numberOfWorkers\":\"k\",\"optimizer\":\"jlpzeqtoyrp\",\"randomSeed\":\"xlaj\",\"stepLRGamma\":\"lpquevhamfow\",\"stepLRStepSize\":\"btmkekxpkzwaq\",\"trainingBatchSize\":\"fqovc\",\"validationBatchSize\":\"qbplvfiduszte\",\"warmupCosineLRCycles\":\"byjgmsfepx\",\"warmupCosineLRWarmupEpochs\":\"hpqadagrhrdicxdw\",\"weightDecay\":\"fowxwyovcxjsgbi\"},{\"boxDetectionsPerImage\":\"ukdveksbuhoduc\",\"boxScoreThreshold\":\"lscrdpibfdyjduss\",\"imageSize\":\"szekbh\",\"maxSize\":\"kaaggkreh\",\"minSize\":\"rnuybffljfii\",\"modelSize\":\"eoagsqta\",\"multiScale\":\"usrexxf\",\"nmsIouThreshold\":\"sqwudohzilfmnli\",\"tileGridSize\":\"simsfeypofqpmb\",\"tileOverlapRatio\":\"qgsdr\",\"tilePredictionsNmsThreshold\":\"ttjxophgerhsmvgo\",\"validationIouThreshold\":\"wzm\",\"validationMetricType\":\"lrixysfnimsq\",\"amsGradient\":\"wwmhkruwae\",\"augmentations\":\"ympmlqoin\",\"beta1\":\"duewihapfj\",\"beta2\":\"knjdiqfliejhp\",\"distributed\":\"bi\",\"earlyStopping\":\"fsbw\",\"earlyStoppingDelay\":\"ivbvzi\",\"earlyStoppingPatience\":\"wxgoooxzpra\",\"enableOnnxNormalization\":\"s\",\"evaluationFrequency\":\"knpdgzigjsu\",\"gradientAccumulationStep\":\"whgsaodkww\",\"layersToFreeze\":\"afoctohz\",\"learningRate\":\"quvwsxbgn\",\"learningRateScheduler\":\"ervqchoadhrsxqvz\",\"modelName\":\"pabdsrg\",\"momentum\":\"jglzrsubklrxhjnl\",\"nesterov\":\"etjdvqydieqqkwa\",\"numberOfEpochs\":\"wdxvqzxoebwg\",\"numberOfWorkers\":\"bibanbau\",\"optimizer\":\"tzvp\",\"randomSeed\":\"lozkxbzrp\",\"stepLRGamma\":\"plssanbtttk\",\"stepLRStepSize\":\"uxunrswg\",\"trainingBatchSize\":\"jhboyikebhuhks\",\"validationBatchSize\":\"wlokhueoijyzcq\",\"warmupCosineLRCycles\":\"zqzu\",\"warmupCosineLRWarmupEpochs\":\"s\",\"weightDecay\":\"ej\"}],\"limitSettings\":{\"maxConcurrentTrials\":1158343098,\"maxTrials\":2133185621,\"timeout\":\"PT173H26M33S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1464302974,\"evaluationInterval\":539908072},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"cf\",\"description\":\"bmxsnxoc\"},\"validationDataSize\":82.41225782753845}")
                .toObject(ImageObjectDetectionBase.class);
        Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials());
        Assertions.assertEquals(2133185621, model.limitSettings().maxTrials());
        Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout());
        Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation());
        Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval());
        Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm());
        Assertions.assertEquals("bmxsnxoc", model.validationData().description());
        Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode());
        Assertions.assertEquals("cf", model.validationData().uri());
        Assertions.assertEquals(82.41225782753845D, model.validationDataSize());
        Assertions.assertEquals("m", model.modelSettings().advancedSettings());
        Assertions.assertEquals(true, model.modelSettings().amsGradient());
        Assertions.assertEquals("ilm", model.modelSettings().augmentations());
        Assertions.assertEquals(66.63753F, model.modelSettings().beta1());
        Assertions.assertEquals(77.31098F, model.modelSettings().beta2());
        Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency());
        Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description());
        Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode());
        Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri());
        Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId());
        Assertions.assertEquals(false, model.modelSettings().distributed());
        Assertions.assertEquals(false, model.modelSettings().earlyStopping());
        Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay());
        Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience());
        Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization());
        Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency());
        Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep());
        Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze());
        Assertions.assertEquals(91.16553F, model.modelSettings().learningRate());
        Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler());
        Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName());
        Assertions.assertEquals(35.669476F, model.modelSettings().momentum());
        Assertions.assertEquals(true, model.modelSettings().nesterov());
        Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs());
        Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers());
        Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer());
        Assertions.assertEquals(961397870, model.modelSettings().randomSeed());
        Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma());
        Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize());
        Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize());
        Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize());
        Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles());
        Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs());
        Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay());
        Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage());
        Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold());
        Assertions.assertEquals(1257411321, model.modelSettings().imageSize());
        Assertions.assertEquals(921466837, model.modelSettings().maxSize());
        Assertions.assertEquals(2015686275, model.modelSettings().minSize());
        Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize());
        Assertions.assertEquals(false, model.modelSettings().multiScale());
        Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold());
        Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize());
        Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio());
        Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold());
        Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold());
        Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType());
        Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient());
        Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations());
        Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1());
        Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2());
        Assertions.assertEquals("ect", model.searchSpace().get(0).distributed());
        Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping());
        Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay());
        Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience());
        Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization());
        Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency());
        Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep());
        Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze());
        Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate());
        Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler());
        Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName());
        Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum());
        Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov());
        Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs());
        Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers());
        Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer());
        Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed());
        Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma());
        Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize());
        Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize());
        Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize());
        Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles());
        Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs());
        Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay());
        Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage());
        Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold());
        Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize());
        Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize());
        Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize());
        Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize());
        Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale());
        Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold());
        Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize());
        Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio());
        Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold());
        Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold());
        Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ImageObjectDetectionBase model =
            new ImageObjectDetectionBase()
                .withLimitSettings(
                    new ImageLimitSettings()
                        .withMaxConcurrentTrials(1158343098)
                        .withMaxTrials(2133185621)
                        .withTimeout(Duration.parse("PT173H26M33S")))
                .withSweepSettings(
                    new ImageSweepSettings()
                        .withEarlyTermination(
                            new EarlyTerminationPolicy()
                                .withDelayEvaluation(1464302974)
                                .withEvaluationInterval(539908072))
                        .withSamplingAlgorithm(SamplingAlgorithmType.GRID))
                .withValidationData(
                    new MLTableJobInput()
                        .withDescription("bmxsnxoc")
                        .withMode(InputDeliveryMode.READ_ONLY_MOUNT)
                        .withUri("cf"))
                .withValidationDataSize(82.41225782753845D)
                .withModelSettings(
                    new ImageModelSettingsObjectDetection()
                        .withAdvancedSettings("m")
                        .withAmsGradient(true)
                        .withAugmentations("ilm")
                        .withBeta1(66.63753F)
                        .withBeta2(77.31098F)
                        .withCheckpointFrequency(1645404857)
                        .withCheckpointModel(
                            new MLFlowModelJobInput()
                                .withDescription("bjwhlwyjfnqzocr")
                                .withMode(InputDeliveryMode.DOWNLOAD)
                                .withUri("nkkbjpjvlywltmfw"))
                        .withCheckpointRunId("gczeuntgx")
                        .withDistributed(false)
                        .withEarlyStopping(false)
                        .withEarlyStoppingDelay(1555790042)
                        .withEarlyStoppingPatience(1557956860)
                        .withEnableOnnxNormalization(true)
                        .withEvaluationFrequency(1852855933)
                        .withGradientAccumulationStep(1891446844)
                        .withLayersToFreeze(888077010)
                        .withLearningRate(91.16553F)
                        .withLearningRateScheduler(LearningRateScheduler.NONE)
                        .withModelName("xgyrihlgmgbehlqt")
                        .withMomentum(35.669476F)
                        .withNesterov(true)
                        .withNumberOfEpochs(2104814940)
                        .withNumberOfWorkers(2146718478)
                        .withOptimizer(StochasticOptimizer.NONE)
                        .withRandomSeed(961397870)
                        .withStepLRGamma(84.43488F)
                        .withStepLRStepSize(1159798592)
                        .withTrainingBatchSize(1968957759)
                        .withValidationBatchSize(1595039473)
                        .withWarmupCosineLRCycles(26.42473F)
                        .withWarmupCosineLRWarmupEpochs(1300894444)
                        .withWeightDecay(80.86428F)
                        .withBoxDetectionsPerImage(220622186)
                        .withBoxScoreThreshold(34.980453F)
                        .withImageSize(1257411321)
                        .withMaxSize(921466837)
                        .withMinSize(2015686275)
                        .withModelSize(ModelSize.NONE)
                        .withMultiScale(false)
                        .withNmsIouThreshold(0.77554584F)
                        .withTileGridSize("aohoqkpjtnq")
                        .withTileOverlapRatio(5.6527376F)
                        .withTilePredictionsNmsThreshold(62.38328F)
                        .withValidationIouThreshold(84.67642F)
                        .withValidationMetricType(ValidationMetricType.NONE))
                .withSearchSpace(
                    Arrays
                        .asList(
                            new ImageModelDistributionSettingsObjectDetection()
                                .withAmsGradient("atuztjct")
                                .withAugmentations("pvbkaehxsmzyg")
                                .withBeta1("wakwseivmakxhys")
                                .withBeta2("ljuxl")
                                .withDistributed("ect")
                                .withEarlyStopping("fjmskdchmaiu")
                                .withEarlyStoppingDelay("vlzw")
                                .withEarlyStoppingPatience("gmfalkzazmgoked")
                                .withEnableOnnxNormalization("qafkmkrokzrth")
                                .withEvaluationFrequency("twpqrtva")
                                .withGradientAccumulationStep("nqnixiezeagmce")
                                .withLayersToFreeze("uugedhfp")
                                .withLearningRate("tlzm")
                                .withLearningRateScheduler("syjdeolctae")
                                .withModelName("syrled")
                                .withMomentum("ustbvtqigdx")
                                .withNesterov("sgeafgfosehx")
                                .withNumberOfEpochs("sxezppkkwaa")
                                .withNumberOfWorkers("k")
                                .withOptimizer("jlpzeqtoyrp")
                                .withRandomSeed("xlaj")
                                .withStepLRGamma("lpquevhamfow")
                                .withStepLRStepSize("btmkekxpkzwaq")
                                .withTrainingBatchSize("fqovc")
                                .withValidationBatchSize("qbplvfiduszte")
                                .withWarmupCosineLRCycles("byjgmsfepx")
                                .withWarmupCosineLRWarmupEpochs("hpqadagrhrdicxdw")
                                .withWeightDecay("fowxwyovcxjsgbi")
                                .withBoxDetectionsPerImage("gsabvcipowzafc")
                                .withBoxScoreThreshold("umljcirvpef")
                                .withImageSize("dvei")
                                .withMaxSize("tjnsx")
                                .withMinSize("jlnsj")
                                .withModelSize("ju")
                                .withMultiScale("xbxq")
                                .withNmsIouThreshold("vuaytuad")
                                .withTileGridSize("xeqbwp")
                                .withTileOverlapRatio("ghyksarcdrnxs")
                                .withTilePredictionsNmsThreshold("vlzladl")
                                .withValidationIouThreshold("kpbqhvfdqqjw")
                                .withValidationMetricType("hwzdanojisgglmv"),
                            new ImageModelDistributionSettingsObjectDetection()
                                .withAmsGradient("wwmhkruwae")
                                .withAugmentations("ympmlqoin")
                                .withBeta1("duewihapfj")
                                .withBeta2("knjdiqfliejhp")
                                .withDistributed("bi")
                                .withEarlyStopping("fsbw")
                                .withEarlyStoppingDelay("ivbvzi")
                                .withEarlyStoppingPatience("wxgoooxzpra")
                                .withEnableOnnxNormalization("s")
                                .withEvaluationFrequency("knpdgzigjsu")
                                .withGradientAccumulationStep("whgsaodkww")
                                .withLayersToFreeze("afoctohz")
                                .withLearningRate("quvwsxbgn")
                                .withLearningRateScheduler("ervqchoadhrsxqvz")
                                .withModelName("pabdsrg")
                                .withMomentum("jglzrsubklrxhjnl")
                                .withNesterov("etjdvqydieqqkwa")
                                .withNumberOfEpochs("wdxvqzxoebwg")
                                .withNumberOfWorkers("bibanbau")
                                .withOptimizer("tzvp")
                                .withRandomSeed("lozkxbzrp")
                                .withStepLRGamma("plssanbtttk")
                                .withStepLRStepSize("uxunrswg")
                                .withTrainingBatchSize("jhboyikebhuhks")
                                .withValidationBatchSize("wlokhueoijyzcq")
                                .withWarmupCosineLRCycles("zqzu")
                                .withWarmupCosineLRWarmupEpochs("s")
                                .withWeightDecay("ej")
                                .withBoxDetectionsPerImage("ukdveksbuhoduc")
                                .withBoxScoreThreshold("lscrdpibfdyjduss")
                                .withImageSize("szekbh")
                                .withMaxSize("kaaggkreh")
                                .withMinSize("rnuybffljfii")
                                .withModelSize("eoagsqta")
                                .withMultiScale("usrexxf")
                                .withNmsIouThreshold("sqwudohzilfmnli")
                                .withTileGridSize("simsfeypofqpmb")
                                .withTileOverlapRatio("qgsdr")
                                .withTilePredictionsNmsThreshold("ttjxophgerhsmvgo")
                                .withValidationIouThreshold("wzm")
                                .withValidationMetricType("lrixysfnimsq")));
        model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class);
        Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials());
        Assertions.assertEquals(2133185621, model.limitSettings().maxTrials());
        Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout());
        Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation());
        Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval());
        Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm());
        Assertions.assertEquals("bmxsnxoc", model.validationData().description());
        Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode());
        Assertions.assertEquals("cf", model.validationData().uri());
        Assertions.assertEquals(82.41225782753845D, model.validationDataSize());
        Assertions.assertEquals("m", model.modelSettings().advancedSettings());
        Assertions.assertEquals(true, model.modelSettings().amsGradient());
        Assertions.assertEquals("ilm", model.modelSettings().augmentations());
        Assertions.assertEquals(66.63753F, model.modelSettings().beta1());
        Assertions.assertEquals(77.31098F, model.modelSettings().beta2());
        Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency());
        Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description());
        Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode());
        Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri());
        Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId());
        Assertions.assertEquals(false, model.modelSettings().distributed());
        Assertions.assertEquals(false, model.modelSettings().earlyStopping());
        Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay());
        Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience());
        Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization());
        Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency());
        Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep());
        Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze());
        Assertions.assertEquals(91.16553F, model.modelSettings().learningRate());
        Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler());
        Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName());
        Assertions.assertEquals(35.669476F, model.modelSettings().momentum());
        Assertions.assertEquals(true, model.modelSettings().nesterov());
        Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs());
        Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers());
        Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer());
        Assertions.assertEquals(961397870, model.modelSettings().randomSeed());
        Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma());
        Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize());
        Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize());
        Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize());
        Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles());
        Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs());
        Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay());
        Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage());
        Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold());
        Assertions.assertEquals(1257411321, model.modelSettings().imageSize());
        Assertions.assertEquals(921466837, model.modelSettings().maxSize());
        Assertions.assertEquals(2015686275, model.modelSettings().minSize());
        Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize());
        Assertions.assertEquals(false, model.modelSettings().multiScale());
        Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold());
        Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize());
        Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio());
        Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold());
        Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold());
        Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType());
        Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient());
        Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations());
        Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1());
        Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2());
        Assertions.assertEquals("ect", model.searchSpace().get(0).distributed());
        Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping());
        Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay());
        Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience());
        Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization());
        Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency());
        Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep());
        Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze());
        Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate());
        Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler());
        Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName());
        Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum());
        Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov());
        Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs());
        Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers());
        Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer());
        Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed());
        Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma());
        Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize());
        Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize());
        Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize());
        Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles());
        Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs());
        Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay());
        Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage());
        Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold());
        Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize());
        Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize());
        Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize());
        Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize());
        Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale());
        Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold());
        Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize());
        Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio());
        Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold());
        Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold());
        Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType());
    }
}
