You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to create a custom ScatterElements ONNX node in Concrete ML.
After the conversion of the graph nodes from ONNX to NumPy, I face the following error: ValueError: Please either set all three 'ordered_module_input_names', 'ordered_module_output_names' and 'quant_layers_dict' or none of them. from concrete/ml/quantization/quantized_module.py", line 109. Below is a snippet of where the ValueError was raised:
all_or_none_params = [
ordered_module_input_names,
ordered_module_output_names,
quant_layers_dict,
]
if not (
all(v is None or v == {} for v in all_or_none_params)
or not any(v is None or v == {} for v in all_or_none_params)
):
raise ValueError(
"Please either set all three 'ordered_module_input_names', "
"'ordered_module_output_names' and 'quant_layers_dict' or none of them."
)
Upon inspection, the variables hold the following values:
ordered_module_input_names: <generator object ONNXConverter.quantize_module.<locals>.<genexpr> at 0x7f0168245660>
ordered_module_output_names: <generator object ONNXConverter.quantize_module.<locals>.<genexpr> at 0x7f0168245740>
quant_layers_dict: {}
Do you have any suggestions on what went wrong and any tips on how to debug above? What is the input and output of above supposed to look like? Thank you!
The text was updated successfully, but these errors were encountered:
Here is the link to my GitHub repository: fabecode/GraphML-FHE. You could view my quantised GNN model in the GINe_FHE class of models.py, and the the state of my Concrete-ML library modifications in the commit history of my local concrete-ml package. If you would like to run the GNN model, you could follow the quick command in gnn_fhe_pipline README.md.
Upon further investigation of the ValueError in quantized_module.py, it seems that the root cause stems from the _quantize_layers function in post_training.py. The has_variable_inputs in line 580 is False, leading to the if block being skipped over, and quant_ops_dict hence being empty.
Any advice or suggestions would be really appreciated. Thank you so much!
Summary
Hello, I am trying to create a custom ScatterElements ONNX node in Concrete ML.
After the conversion of the graph nodes from ONNX to NumPy, I face the following error:
ValueError: Please either set all three 'ordered_module_input_names', 'ordered_module_output_names' and 'quant_layers_dict' or none of them.
fromconcrete/ml/quantization/quantized_module.py", line 109.
Below is a snippet of where the ValueError was raised:Upon inspection, the variables hold the following values:
ordered_module_input_names
:<generator object ONNXConverter.quantize_module.<locals>.<genexpr> at 0x7f0168245660>
ordered_module_output_names
:<generator object ONNXConverter.quantize_module.<locals>.<genexpr> at 0x7f0168245740>
quant_layers_dict
: {}Do you have any suggestions on what went wrong and any tips on how to debug above? What is the input and output of above supposed to look like? Thank you!
The text was updated successfully, but these errors were encountered: