Skip to content

Commit

Permalink
Remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescMartiEscofetQC committed Jul 3, 2024
1 parent f1e7717 commit 53d8338
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/test_xlearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,13 @@ def test_xlearner_onnx(
onnx_models[PROPENSITY_MODEL].append(onnx_model)

final = ml.build_onnx(onnx_models)
intermediate_tensor_name = "Div_1_C"
intermediate_layer_value_info = onnx.helper.ValueInfoProto()
intermediate_layer_value_info.name = intermediate_tensor_name
final.graph.output.extend([intermediate_layer_value_info])

sess = rt.InferenceSession(
final.SerializeToString(), providers=rt.get_available_providers()
)

pred_onnx = sess.run(
["tau", "Div_1_C"],
["tau"],
{"input": X.astype(np.float32)},
)
np.testing.assert_allclose(ml.predict(X, True, "overall"), pred_onnx[0], atol=5e-4)

0 comments on commit 53d8338

Please sign in to comment.