File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -220,17 +220,26 @@ def validate_svs_params(self):
220220 f"Unsupported types: BFLOAT16, FLOAT64, INT8, UINT8."
221221 )
222222
223- # Reduce validation: must be less than dims
223+ # Reduce validation: must be less than dims and only valid with LeanVec
224224 if self .reduce is not None :
225225 if self .reduce >= self .dims :
226226 raise ValueError (
227227 f"reduce ({ self .reduce } ) must be less than dims ({ self .dims } )"
228228 )
229- # Phase C: Add warning for reduce without LeanVec
230- # if not self.compression or not self.compression.value.startswith("LeanVec"):
231- # logger.warning(
232- # "reduce parameter is recommended with LeanVec compression"
233- # )
229+
230+ # Validate that reduce is only used with LeanVec compression
231+ if self .compression is None :
232+ raise ValueError (
233+ "reduce parameter requires compression to be set. "
234+ "Use LeanVec4x8 or LeanVec8x8 compression with reduce."
235+ )
236+
237+ if not self .compression .value .startswith ("LeanVec" ):
238+ raise ValueError (
239+ f"reduce parameter is only supported with LeanVec compression types. "
240+ f"Got compression={ self .compression .value } . "
241+ f"Either use LeanVec4x8/LeanVec8x8 or remove the reduce parameter."
242+ )
234243
235244 # Phase C: Add warning for LeanVec without reduce
236245 # if self.compression and self.compression.value.startswith("LeanVec") and not self.reduce:
You can’t perform that action at this time.
0 commit comments