Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: When all class_ids in the constructed TreeEnsembleClassifier object are 0, the returned labels are incorrect and the order of scores for each row is inconsistent. #506

Closed
Cc-a23187 opened this issue Dec 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Cc-a23187
Copy link

Bug Report

Orion version:
v0.1.8

Scarb version:
scarb 2.3.1 (0c8def3aa 2023-10-31)
cairo: 2.3.1 (https://crates.io/crates/cairo-lang-compiler/2.3.1)
sierra: 1.3.0

Current behavior:

When all class_ids in the TreeEnsembleClassifier object are 0 (there are two cases for classlabels), the predicted results from the Orion operator differ from the predictions of the correct model. The scores are the same but the order is inconsistent.


Orion execute result in cairo

Expected behavior:

Get the same result as onnxruntime, like here👇:


Onnxruntime execute result in python

Steps to reproduce:
bc.zip

upzip bc.zip
cd bc
scarb cairo-run --available-gas 99999999999

Other information:

Problem Localization:

The TreeEnsembleClassifier::predict function in the Orion library is missing the [binary value processing] operation.

Solution:

Adding the corresponding binary logic will solve this issue. I will submit a PR today to address this issue.

@Cc-a23187 Cc-a23187 added the bug Something isn't working label Dec 15, 2023
@Cc-a23187
Copy link
Author

Close the issue, notice the mention in this line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant