@@ -57,26 +57,21 @@ def validate_against(self, optimization_combination, rule_set: _OptimizationCont
5757
5858 # optimization technique combinations that need to be validated
5959 if optimization_combination .compilation and optimization_combination .speculative_decoding :
60- copy_compilation = optimization_combination .compilation .copy ()
61- copy_speculative_decoding = optimization_combination .speculative_decoding .copy ()
62- if (
63- copy_compilation .pop () and copy_speculative_decoding .pop ()
64- ): # Check that the 2 techniques are not None
60+ is_compiled = optimization_combination .compilation .copy ().pop ()
61+ is_speculative_decoding = optimization_combination .speculative_decoding .copy ().pop ()
62+ if is_compiled and is_speculative_decoding :
6563 raise ValueError ("Compilation and Speculative Decoding together" )
6664
6765 if rule_set == _OptimizationContainer .TRT :
68- if (
69- optimization_combination .compilation
70- and not optimization_combination .quantization_technique
71- or not optimization_combination .compilation
72- and optimization_combination .quantization_technique
73- ):
66+ is_compiled = optimization_combination .compilation .copy ().pop ()
67+ is_quantized = optimization_combination .quantization_technique .copy ().pop ()
68+ if is_compiled and not is_quantized or is_quantized and not is_compiled :
7469 raise ValueError ("Compilation must be provided with Quantization" )
7570 else :
76- copy_compilation = optimization_combination .compilation .copy ()
77- copy_quantization_technique = optimization_combination .quantization_technique .copy ()
71+ is_compiled = optimization_combination .compilation .copy (). pop ()
72+ is_quantization_technique = optimization_combination .quantization_technique .copy (). pop ()
7873 if (
79- copy_compilation . pop () and copy_quantization_technique . pop ()
74+ is_compiled and is_quantization_technique
8075 ): # Check that the 2 techniques are not None
8176 raise ValueError (
8277 f"Compilation and Quantization:{ optimization_combination .quantization_technique .pop ()} "
@@ -99,8 +94,8 @@ def validate_against(self, optimization_combination, rule_set: _OptimizationCont
9994 "supported_instance_families" : {"p4d" , "p4de" , "p5" , "g5" , "g6" },
10095 "optimization_combination" : _OptimizationCombination (
10196 optimization_container = _OptimizationContainer .VLLM ,
102- compilation = TRUTHY_SET ,
103- quantization_technique = {None , "awq" , "fp8" },
97+ compilation = FALSY_SET ,
98+ quantization_technique = {None },
10499 speculative_decoding = TRUTHY_SET ,
105100 sharding = TRUTHY_SET ,
106101 ),
@@ -203,8 +198,9 @@ def _validate_optimization_configuration(
203198 optimization_combination , rule_set = _OptimizationContainer .VLLM
204199 )
205200 )
201+ print ("fsdafas" )
206202 except ValueError as vllm_compare_error :
207- if trt_compare_error == "Compilation must be provided with Quantization" :
203+ if str ( trt_compare_error ) == "Compilation must be provided with Quantization" :
208204 joint_error_msg = f"""
209205 Optimization cannot be performed for the following reasons:
210206 - Optimizations that use { trt_compare_error } and vice-versa for GPU instances.
0 commit comments