def test_custom_params_descriptor(datadir, filename): descriptor = BenchmarkDescriptor.from_toml(str(datadir / filename)) assert descriptor.custom_params.hyper_params["amp"] assert descriptor.custom_params.hyper_params["validation_frequency"] == 10 assert descriptor.custom_params.python_version == "py2" assert descriptor.custom_params.sagemaker_job_name == "testJob" assert descriptor.custom_params.region == "us-east-1" assert descriptor.custom_params.dashboard == "test_dashboard" assert descriptor.custom_params.merge
def test_minimal_descriptor(datadir, filename): BenchmarkDescriptor.from_toml(str(datadir / filename))
def test_wrong_descriptor(datadir, filename): with pytest.raises(DescriptorError): BenchmarkDescriptor.from_toml(str(datadir / filename))