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

feat: Add method to get lightgbm native model string directly #1515

Merged

Conversation

imatiach-msft
Copy link
Contributor

@imatiach-msft imatiach-msft commented May 20, 2022

Summary

This PR adds the ability to get the native lightgbm model directly as a string.
This is for the spark version of error analysis, to retrieve the trained surrogate model on errors for traversal in the RAI toolbox:

https://github.com/microsoft/responsible-ai-toolbox/blob/main/erroranalysis/erroranalysis/_internal/surrogate_error_tree.py#L296

For more information on error analysis please see:

https://github.com/microsoft/responsible-ai-toolbox/blob/main/docs/erroranalysis-dashboard-README.md

image

Tests

I validated that I can get the model string from the LightGBM model.

Dependency changes

No dependency changes required.

AB#1800563

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2022

Codecov Report

Merging #1515 (c4892fa) into master (8e7151b) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1515      +/-   ##
==========================================
+ Coverage   84.24%   84.30%   +0.05%     
==========================================
  Files         296      296              
  Lines       14906    14904       -2     
  Branches      717      714       -3     
==========================================
+ Hits        12558    12565       +7     
+ Misses       2348     2339       -9     
Impacted Files Coverage Δ
...azure/synapse/ml/lightgbm/LightGBMClassifier.scala 91.20% <ø> (-0.19%) ⬇️
...oft/azure/synapse/ml/lightgbm/LightGBMRanker.scala 64.38% <ø> (+1.71%) ⬆️
.../azure/synapse/ml/lightgbm/LightGBMRegressor.scala 77.58% <ø> (+2.58%) ⬆️
...ure/synapse/ml/lightgbm/LightGBMModelMethods.scala 83.33% <100.00%> (+5.55%) ⬆️
.../synapse/ml/lightgbm/booster/LightGBMBooster.scala 92.75% <100.00%> (+0.03%) ⬆️
...zure/synapse/ml/stages/PartitionConsolidator.scala 93.61% <0.00%> (-2.13%) ⬇️
...crosoft/azure/synapse/ml/io/http/HTTPClients.scala 75.00% <0.00%> (+8.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e7151b...c4892fa. Read the comment docs.

@imatiach-msft imatiach-msft force-pushed the ilmat/add-get-native-model branch from 2a24b6d to c4892fa Compare May 20, 2022 05:31
@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mhamilton723
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants