-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Fix model locale issue and improve model R/W performance. #3405
Merged
Commits on Nov 24, 2020
-
Fix LightGBM models locale sensitivity and improve R/W performance.
When Java is used, the default C++ locale is broken. This is true for Java providers that use the C API or even Python models that require JEP. This patch solves that issue making the model reads/writes insensitive to such settings. To achieve it, within the model read/write codebase: - C++ streams are imbued with the classic locale - Calls to functions that are dependent on the locale are replaced - The default locale is not changed! This approach means: - The user's locale is never tampered with, avoiding issues such as microsoft#2979 with the previous approach microsoft#2891 - Datasets can still be read according the user's locale - The model file has a single format independent of locale Changes: - Add CommonC namespace which provides faster locale-independent versions of Common's methods - Model code makes conversions through CommonC - Cleanup unused Common methods - Performance improvements. Use fast libraries for locale-agnostic conversion: - value->string: https://github.com/fmtlib/fmt - string->double: https://github.com/lemire/fast_double_parser (10x faster double parsing according to their benchmark) Bugfixes: - microsoft#2500 - microsoft#2890 - ninia/jep#205 (as it is related to LGBM as well)
Configuration menu - View commit details
-
Copy full SHA for 4bf22a9 - Browse repository at this point
Copy the full SHA 4bf22a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 538e102 - Browse repository at this point
Copy the full SHA 538e102View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcdb89 - Browse repository at this point
Copy the full SHA bfcdb89View commit details -
Testing commit e09e5aad828bcb16bea7ed0ed8322e019112fdbe If it works it should fix more LGBM builds
Configuration menu - View commit details
-
Copy full SHA for 30ae0c0 - Browse repository at this point
Copy the full SHA 30ae0c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a97aba - Browse repository at this point
Copy the full SHA 3a97abaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 447050e - Browse repository at this point
Copy the full SHA 447050eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 37c0cd4 - Browse repository at this point
Copy the full SHA 37c0cd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6dcc5d0 - Browse repository at this point
Copy the full SHA 6dcc5d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7c1977 - Browse repository at this point
Copy the full SHA c7c1977View commit details -
Configuration menu - View commit details
-
Copy full SHA for a206715 - Browse repository at this point
Copy the full SHA a206715View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8556ab - Browse repository at this point
Copy the full SHA f8556abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 18c6773 - Browse repository at this point
Copy the full SHA 18c6773View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d6ec54 - Browse repository at this point
Copy the full SHA 8d6ec54View commit details -
Configuration menu - View commit details
-
Copy full SHA for 859013a - Browse repository at this point
Copy the full SHA 859013aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01a07a4 - Browse repository at this point
Copy the full SHA 01a07a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ed5a39 - Browse repository at this point
Copy the full SHA 9ed5a39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 658b00b - Browse repository at this point
Copy the full SHA 658b00bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 91dd2d8 - Browse repository at this point
Copy the full SHA 91dd2d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f90fa3b - Browse repository at this point
Copy the full SHA f90fa3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d062736 - Browse repository at this point
Copy the full SHA d062736View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3235fc - Browse repository at this point
Copy the full SHA e3235fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e4997bd - Browse repository at this point
Copy the full SHA e4997bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c16913 - Browse repository at this point
Copy the full SHA 5c16913View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03bd3b2 - Browse repository at this point
Copy the full SHA 03bd3b2View commit details -
Revert "Add PRIVATE argument to target_link_libraries"
This reverts commit 3dd45dd.
Configuration menu - View commit details
-
Copy full SHA for 51843f7 - Browse repository at this point
Copy the full SHA 51843f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90f8bd8 - Browse repository at this point
Copy the full SHA 90f8bd8View commit details -
Update R-package/.Rbuildignore
Co-authored-by: James Lamb <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eda4759 - Browse repository at this point
Copy the full SHA eda4759View commit details -
Configuration menu - View commit details
-
Copy full SHA for 082c1d4 - Browse repository at this point
Copy the full SHA 082c1d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc19daf - Browse repository at this point
Copy the full SHA cc19dafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69d0488 - Browse repository at this point
Copy the full SHA 69d0488View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1411133 - Browse repository at this point
Copy the full SHA 1411133View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba28c0f - Browse repository at this point
Copy the full SHA ba28c0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e17729 - Browse repository at this point
Copy the full SHA 7e17729View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.