@pytest.mark.skipif((tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS), reason='AutoML is not supported in the region yet.')
def test_auto_ml_fit_optional_args(sagemaker_session):
    output_path = 's3://{}/{}'.format(sagemaker_session.default_bucket(), 'specified_ouput_path')
    problem_type = 'MulticlassClassification'
    job_objective = {'MetricName': 'Accuracy'}
    auto_ml = AutoML(role=ROLE, target_attribute_name=TARGET_ATTRIBUTE_NAME, sagemaker_session=sagemaker_session, max_candidates=1, output_path=output_path, problem_type=problem_type, job_objective=job_objective)
    inputs = TRAINING_DATA
    with timeout(minutes=AUTO_ML_DEFAULT_TIMEMOUT_MINUTES):
        auto_ml.fit(inputs, job_name=unique_name_from_base(BASE_JOB_NAME))
    auto_ml_desc = auto_ml.describe_auto_ml_job(job_name=auto_ml.latest_auto_ml_job.job_name)
    assert (auto_ml_desc['AutoMLJobStatus'] == 'Completed')
    assert (auto_ml_desc['AutoMLJobName'] == auto_ml.latest_auto_ml_job.job_name)
    assert (auto_ml_desc['AutoMLJobObjective'] == job_objective)
    assert (auto_ml_desc['ProblemType'] == problem_type)
    assert (auto_ml_desc['OutputDataConfig']['S3OutputPath'] == output_path)
@pytest.mark.skipif((tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS), reason='AutoML is not supported in the region yet.')
def test_auto_ml_fit_optional_args(sagemaker_session):
    output_path = 's3://{}/{}'.format(sagemaker_session.default_bucket(), 'specified_ouput_path')
    problem_type = 'MulticlassClassification'
    job_objective = {'MetricName': 'Accuracy'}
    auto_ml = AutoML(role=ROLE, target_attribute_name=TARGET_ATTRIBUTE_NAME, sagemaker_session=sagemaker_session, max_candidates=1, output_path=output_path, problem_type=problem_type, job_objective=job_objective)
    inputs = TRAINING_DATA
    with timeout(minutes=AUTO_ML_DEFAULT_TIMEMOUT_MINUTES):
        auto_ml.fit(inputs, job_name=unique_name_from_base(BASE_JOB_NAME))
    auto_ml_desc = auto_ml.describe_auto_ml_job(job_name=auto_ml.latest_auto_ml_job.job_name)
    assert (auto_ml_desc['AutoMLJobStatus'] == 'Completed')
    assert (auto_ml_desc['AutoMLJobName'] == auto_ml.latest_auto_ml_job.job_name)
    assert (auto_ml_desc['AutoMLJobObjective'] == job_objective)
    assert (auto_ml_desc['ProblemType'] == problem_type)
    assert (auto_ml_desc['OutputDataConfig']['S3OutputPath'] == output_path)