Skip to content

Commit d0c3894

Browse files
AWS Clean Rooms ML now supports advanced Spark configurations to optimize SQL performance when creating an MLInputChannel or an audience generation job.
1 parent 8607841 commit d0c3894

File tree

10 files changed

+312
-133
lines changed

10 files changed

+312
-133
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.721
1+
1.11.722

generated/src/aws-cpp-sdk-cleanroomsml/include/aws/cleanroomsml/model/ResourceConfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ class ResourceConfig {
6666

6767
///@{
6868
/**
69-
* <p>The maximum size of the instance that is used to train the model.</p>
69+
* <p>The volume size of the instance that is used to train the model. Please see
70+
* <a
71+
* href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-volumes.html">EC2
72+
* volume limit</a> for volume size limitations on different instance types.</p>
7073
*/
7174
inline int GetVolumeSizeInGB() const { return m_volumeSizeInGB; }
7275
inline bool VolumeSizeInGBHasBeenSet() const { return m_volumeSizeInGBHasBeenSet; }

generated/src/aws-cpp-sdk-cleanroomsml/include/aws/cleanroomsml/model/WorkerComputeConfiguration.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77
#include <aws/cleanroomsml/CleanRoomsML_EXPORTS.h>
8+
#include <aws/cleanroomsml/model/WorkerComputeConfigurationProperties.h>
89
#include <aws/cleanroomsml/model/WorkerComputeType.h>
910

1011
#include <utility>
@@ -63,12 +64,31 @@ class WorkerComputeConfiguration {
6364
return *this;
6465
}
6566
///@}
67+
68+
///@{
69+
70+
inline const WorkerComputeConfigurationProperties& GetProperties() const { return m_properties; }
71+
inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
72+
template <typename PropertiesT = WorkerComputeConfigurationProperties>
73+
void SetProperties(PropertiesT&& value) {
74+
m_propertiesHasBeenSet = true;
75+
m_properties = std::forward<PropertiesT>(value);
76+
}
77+
template <typename PropertiesT = WorkerComputeConfigurationProperties>
78+
WorkerComputeConfiguration& WithProperties(PropertiesT&& value) {
79+
SetProperties(std::forward<PropertiesT>(value));
80+
return *this;
81+
}
82+
///@}
6683
private:
6784
WorkerComputeType m_type{WorkerComputeType::NOT_SET};
6885

6986
int m_number{0};
87+
88+
WorkerComputeConfigurationProperties m_properties;
7089
bool m_typeHasBeenSet = false;
7190
bool m_numberHasBeenSet = false;
91+
bool m_propertiesHasBeenSet = false;
7292
};
7393

7494
} // namespace Model
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/cleanroomsml/CleanRoomsML_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSMap.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
10+
11+
#include <utility>
12+
13+
namespace Aws {
14+
namespace Utils {
15+
namespace Json {
16+
class JsonValue;
17+
class JsonView;
18+
} // namespace Json
19+
} // namespace Utils
20+
namespace CleanRoomsML {
21+
namespace Model {
22+
23+
/**
24+
* <p>The configuration properties for the worker compute environment. These
25+
* properties allow you to customize the compute settings for your Clean Rooms
26+
* workloads.</p><p><h3>See Also:</h3> <a
27+
* href="http://docs.aws.amazon.com/goto/WebAPI/cleanroomsml-2023-09-06/WorkerComputeConfigurationProperties">AWS
28+
* API Reference</a></p>
29+
*/
30+
class WorkerComputeConfigurationProperties {
31+
public:
32+
AWS_CLEANROOMSML_API WorkerComputeConfigurationProperties() = default;
33+
AWS_CLEANROOMSML_API WorkerComputeConfigurationProperties(Aws::Utils::Json::JsonView jsonValue);
34+
AWS_CLEANROOMSML_API WorkerComputeConfigurationProperties& operator=(Aws::Utils::Json::JsonView jsonValue);
35+
AWS_CLEANROOMSML_API Aws::Utils::Json::JsonValue Jsonize() const;
36+
37+
///@{
38+
/**
39+
* <p>The Spark configuration properties for SQL workloads. This map contains
40+
* key-value pairs that configure Apache Spark settings to optimize performance for
41+
* your data processing jobs. You can specify up to 50 Spark properties, with each
42+
* key being 1-200 characters and each value being 0-500 characters. These
43+
* properties allow you to adjust compute capacity for large datasets and complex
44+
* workloads.</p>
45+
*/
46+
inline const Aws::Map<Aws::String, Aws::String>& GetSpark() const { return m_spark; }
47+
inline bool SparkHasBeenSet() const { return m_sparkHasBeenSet; }
48+
template <typename SparkT = Aws::Map<Aws::String, Aws::String>>
49+
void SetSpark(SparkT&& value) {
50+
m_sparkHasBeenSet = true;
51+
m_spark = std::forward<SparkT>(value);
52+
}
53+
template <typename SparkT = Aws::Map<Aws::String, Aws::String>>
54+
WorkerComputeConfigurationProperties& WithSpark(SparkT&& value) {
55+
SetSpark(std::forward<SparkT>(value));
56+
return *this;
57+
}
58+
template <typename SparkKeyT = Aws::String, typename SparkValueT = Aws::String>
59+
WorkerComputeConfigurationProperties& AddSpark(SparkKeyT&& key, SparkValueT&& value) {
60+
m_sparkHasBeenSet = true;
61+
m_spark.emplace(std::forward<SparkKeyT>(key), std::forward<SparkValueT>(value));
62+
return *this;
63+
}
64+
///@}
65+
private:
66+
Aws::Map<Aws::String, Aws::String> m_spark;
67+
bool m_sparkHasBeenSet = false;
68+
};
69+
70+
} // namespace Model
71+
} // namespace CleanRoomsML
72+
} // namespace Aws

generated/src/aws-cpp-sdk-cleanroomsml/source/model/WorkerComputeConfiguration.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ WorkerComputeConfiguration& WorkerComputeConfiguration::operator=(JsonView jsonV
2626
m_number = jsonValue.GetInteger("number");
2727
m_numberHasBeenSet = true;
2828
}
29+
if (jsonValue.ValueExists("properties")) {
30+
m_properties = jsonValue.GetObject("properties");
31+
m_propertiesHasBeenSet = true;
32+
}
2933
return *this;
3034
}
3135

@@ -40,6 +44,10 @@ JsonValue WorkerComputeConfiguration::Jsonize() const {
4044
payload.WithInteger("number", m_number);
4145
}
4246

47+
if (m_propertiesHasBeenSet) {
48+
payload.WithObject("properties", m_properties.Jsonize());
49+
}
50+
4351
return payload;
4452
}
4553

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#include <aws/cleanroomsml/model/WorkerComputeConfigurationProperties.h>
7+
#include <aws/core/utils/json/JsonSerializer.h>
8+
9+
#include <utility>
10+
11+
using namespace Aws::Utils::Json;
12+
using namespace Aws::Utils;
13+
14+
namespace Aws {
15+
namespace CleanRoomsML {
16+
namespace Model {
17+
18+
WorkerComputeConfigurationProperties::WorkerComputeConfigurationProperties(JsonView jsonValue) { *this = jsonValue; }
19+
20+
WorkerComputeConfigurationProperties& WorkerComputeConfigurationProperties::operator=(JsonView jsonValue) {
21+
if (jsonValue.ValueExists("spark")) {
22+
Aws::Map<Aws::String, JsonView> sparkJsonMap = jsonValue.GetObject("spark").GetAllObjects();
23+
for (auto& sparkItem : sparkJsonMap) {
24+
m_spark[sparkItem.first] = sparkItem.second.AsString();
25+
}
26+
m_sparkHasBeenSet = true;
27+
}
28+
return *this;
29+
}
30+
31+
JsonValue WorkerComputeConfigurationProperties::Jsonize() const {
32+
JsonValue payload;
33+
34+
if (m_sparkHasBeenSet) {
35+
JsonValue sparkJsonMap;
36+
for (auto& sparkItem : m_spark) {
37+
sparkJsonMap.WithString(sparkItem.first, sparkItem.second);
38+
}
39+
payload.WithObject("spark", std::move(sparkJsonMap));
40+
}
41+
42+
return payload;
43+
}
44+
45+
} // namespace Model
46+
} // namespace CleanRoomsML
47+
} // namespace Aws

generated/tests/cleanroomsml-gen-tests/CleanRoomsMLIncludeTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
#include <aws/cleanroomsml/model/UpdateConfiguredAudienceModelRequest.h>
226226
#include <aws/cleanroomsml/model/UpdateConfiguredAudienceModelResult.h>
227227
#include <aws/cleanroomsml/model/WorkerComputeConfiguration.h>
228+
#include <aws/cleanroomsml/model/WorkerComputeConfigurationProperties.h>
228229
#include <aws/cleanroomsml/model/WorkerComputeType.h>
229230

230231
using CleanRoomsMLIncludeTest = ::testing::Test;

src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
#pragma once
66

7-
#define AWS_SDK_VERSION_STRING "1.11.721"
7+
#define AWS_SDK_VERSION_STRING "1.11.722"
88
#define AWS_SDK_VERSION_MAJOR 1
99
#define AWS_SDK_VERSION_MINOR 11
10-
#define AWS_SDK_VERSION_PATCH 721
10+
#define AWS_SDK_VERSION_PATCH 722

tools/code-generation/api-descriptions/cleanroomsml-2023-09-06.normal.json

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5426,8 +5426,7 @@
54265426
"type":"structure",
54275427
"required":[
54285428
"epsilon",
5429-
"maxMembershipInferenceAttackScore",
5430-
"columnClassification"
5429+
"maxMembershipInferenceAttackScore"
54315430
],
54325431
"members":{
54335432
"epsilon":{
@@ -5628,17 +5627,17 @@
56285627
"NONE"
56295628
]
56305629
},
5631-
"ParameterKey":{
5630+
"ParameterMap":{
5631+
"type":"map",
5632+
"key":{"shape":"ParameterName"},
5633+
"value":{"shape":"ParameterValue"}
5634+
},
5635+
"ParameterName":{
56325636
"type":"string",
56335637
"max":100,
56345638
"min":1,
56355639
"pattern":"[0-9a-zA-Z_]+"
56365640
},
5637-
"ParameterMap":{
5638-
"type":"map",
5639-
"key":{"shape":"ParameterKey"},
5640-
"value":{"shape":"ParameterValue"}
5641-
},
56425641
"ParameterValue":{
56435642
"type":"string",
56445643
"max":250,
@@ -5833,7 +5832,7 @@
58335832
},
58345833
"volumeSizeInGB":{
58355834
"shape":"ResourceConfigVolumeSizeInGBInteger",
5836-
"documentation":"<p>The maximum size of the instance that is used to train the model.</p>"
5835+
"documentation":"<p>The volume size of the instance that is used to train the model. Please see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-volumes.html\">EC2 volume limit</a> for volume size limitations on different instance types.</p>"
58375836
}
58385837
},
58395838
"documentation":"<p>Information about the EC2 resources that are used to train the model.</p>"
@@ -5940,6 +5939,23 @@
59405939
"NONE"
59415940
]
59425941
},
5942+
"SparkProperties":{
5943+
"type":"map",
5944+
"key":{"shape":"SparkPropertyKey"},
5945+
"value":{"shape":"SparkPropertyValue"},
5946+
"max":50,
5947+
"min":0
5948+
},
5949+
"SparkPropertyKey":{
5950+
"type":"string",
5951+
"max":200,
5952+
"min":1
5953+
},
5954+
"SparkPropertyValue":{
5955+
"type":"string",
5956+
"max":500,
5957+
"min":0
5958+
},
59435959
"StartAudienceExportJobRequest":{
59445960
"type":"structure",
59455961
"required":[
@@ -6829,7 +6845,8 @@
68296845
"number":{
68306846
"shape":"WorkerComputeConfigurationNumberInteger",
68316847
"documentation":"<p>The number of compute workers that are used.</p>"
6832-
}
6848+
},
6849+
"properties":{"shape":"WorkerComputeConfigurationProperties"}
68336850
},
68346851
"documentation":"<p>Configuration information about the compute workers that perform the transform job.</p>"
68356852
},
@@ -6839,6 +6856,17 @@
68396856
"max":400,
68406857
"min":2
68416858
},
6859+
"WorkerComputeConfigurationProperties":{
6860+
"type":"structure",
6861+
"members":{
6862+
"spark":{
6863+
"shape":"SparkProperties",
6864+
"documentation":"<p>The Spark configuration properties for SQL workloads. This map contains key-value pairs that configure Apache Spark settings to optimize performance for your data processing jobs. You can specify up to 50 Spark properties, with each key being 1-200 characters and each value being 0-500 characters. These properties allow you to adjust compute capacity for large datasets and complex workloads.</p>"
6865+
}
6866+
},
6867+
"documentation":"<p>The configuration properties for the worker compute environment. These properties allow you to customize the compute settings for your Clean Rooms workloads.</p>",
6868+
"union":true
6869+
},
68426870
"WorkerComputeType":{
68436871
"type":"string",
68446872
"enum":[

0 commit comments

Comments
 (0)