@@ -211,9 +211,9 @@ def generate_a3_mega_blueprint(
211211 outputs = ["instructions" ],
212212 )
213213 if capacity_type == CapacityType .FLEX_START :
214- a3_megagpu_pool_0 .settings . update (self .get_dws_flex_start ())
214+ a3_megagpu_pool_0 .update_settings (self .get_dws_flex_start ())
215215 else :
216- a3_megagpu_pool_0 .settings . update ({"static_node_count" : num_nodes })
216+ a3_megagpu_pool_0 .update_settings ({"static_node_count" : num_nodes })
217217
218218 set_placement_policy = capacity_type != CapacityType .SPOT
219219 workload = DeploymentModule (
@@ -252,8 +252,8 @@ def generate_a3_mega_blueprint(
252252
253253 print (reservation_placement_policy )
254254 if reservation_placement_policy is not None :
255- a3_megagpu_pool_0 .settings [ "placement_policy" ] = (
256- reservation_placement_policy
255+ a3_megagpu_pool_0 .set_setting (
256+ "placement_policy" , reservation_placement_policy
257257 )
258258
259259 primary_group = DeploymentGroup (
@@ -268,7 +268,7 @@ def generate_a3_mega_blueprint(
268268 ],
269269 )
270270 if set_placement_policy and reservation_placement_policy is None :
271- a3_megagpu_pool_0 .use . append (group_placement_0 .id )
271+ a3_megagpu_pool_0 .append_use (group_placement_0 .id )
272272 primary_group .modules .append (group_placement_0 )
273273 a3_mega_blueprint = Blueprint (
274274 terraform_backend_defaults = self ._getblock_terraform_backend (
@@ -580,9 +580,9 @@ def generate_a3_ultra_blueprint(
580580 outputs = ["instructions" ],
581581 )
582582 if capacity_type == CapacityType .FLEX_START :
583- gpu_pool .settings . update (self .get_dws_flex_start ())
583+ gpu_pool .update_settings (self .get_dws_flex_start ())
584584 else :
585- gpu_pool .settings . update ({"static_node_count" : num_nodes })
585+ gpu_pool .update_settings ({"static_node_count" : num_nodes })
586586
587587 workload_manager_install_id = "workload-manager-install"
588588 workload_manager_install = DeploymentModule (
@@ -855,9 +855,9 @@ def generate_a4_blueprint(
855855 outputs = ["instructions" ],
856856 )
857857 if capacity_type == CapacityType .FLEX_START :
858- gpu_pool .settings . update (self .get_dws_flex_start ())
858+ gpu_pool .update_settings (self .get_dws_flex_start ())
859859 else :
860- gpu_pool .settings . update ({"static_node_count" : num_nodes })
860+ gpu_pool .update_settings ({"static_node_count" : num_nodes })
861861
862862 workload_manager_install_id = "workload-manager-install"
863863 workload_manager_install = DeploymentModule (
@@ -956,7 +956,7 @@ def _getblock_reservation_affinity(
956956 )
957957
958958 def _getblock_terraform_backend (
959- self , gcs_bucket : str , cluster_name : str , prefix : str = ""
959+ self , gcs_bucket : str | None , cluster_name : str , prefix : str = ""
960960 ) -> dict | None :
961961 if gcs_bucket is None :
962962 return None
@@ -986,7 +986,7 @@ def _save_blueprint_to_file(
986986 yaml_parser .dump (xpk_blueprint , blueprint_file )
987987 return blueprint_path
988988
989- def _get_blueprint_path (self , blueprint_name , prefix : str = "" ):
989+ def _get_blueprint_path (self , blueprint_name , prefix : str = "" ) -> str :
990990 blueprint_path = os .path .join (
991991 self ._get_storage_path (prefix ), f"{ blueprint_name } .yaml"
992992 )
0 commit comments