Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xadupre committed Feb 27, 2025
1 parent e37520a commit df637d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_sklearn_nearest_neighbour_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,10 +1760,10 @@ def test_knn_imputer_one_nan(self):
input_data = data.astype(np.float32)
initial_type = [("float_input", FloatTensorType([None, data.shape[1]]))]
onnx_model = convert_sklearn(imputer, initial_types=initial_type)
with open("test_knn_imputer_one_nan.onnx", "wb") as f:
f.write(onnx_model.SerializeToString())
# with open("test_knn_imputer_one_nan.onnx", "wb") as f:
# f.write(onnx_model.SerializeToString())

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.

sess = rt.InferenceSession("test_knn_imputer_one_nan.onnx")
sess = rt.InferenceSession(onnx_model.SerializeToString())
input_name = sess.get_inputs()[0].name
output_name = sess.get_outputs()[0].name
res = sess.run([output_name], {input_name: input_data})
Expand Down

0 comments on commit df637d4

Please sign in to comment.