def data_quality_supplied_baseline_statistics(sagemaker_session): return Statistics.from_file_path( statistics_file_path=os.path.join( DATA_DIR, "pipeline/quality_check_step/data_quality/statistics.json" ), sagemaker_session=sagemaker_session, ).file_s3_uri
def test_statistics_object_creation_from_file_path_without_customizations(): statistics = Statistics.from_file_path(statistics_file_path=os.path.join( tests.integ.DATA_DIR, "monitor/statistics.json")) assert statistics.file_s3_uri.startswith("s3://") assert statistics.file_s3_uri.endswith("statistics.json") assert statistics.body_dict["dataset"]["item_count"] == 418
def test_statistics_object_creation_from_file_path_with_customizations( sagemaker_session, monitoring_files_kms_key): statistics = Statistics.from_file_path( statistics_file_path=os.path.join(tests.integ.DATA_DIR, "monitor/statistics.json"), kms_key=monitoring_files_kms_key, sagemaker_session=sagemaker_session, ) assert statistics.file_s3_uri.startswith("s3://") assert statistics.file_s3_uri.endswith("statistics.json") assert statistics.body_dict["dataset"]["item_count"] == 418