-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[MRG] Show versions and system info for debugging #557
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
Conversation
Add `imblearn/utils/_show_versions.py` with `show_versions` This uses the private methods from `sklearn.utils._show_versions`, but adapts the outputs in order to also print GitHub markdown for use when filing issues or pull requests. ``` from imblearn.utils._show_versions import show_versions show_versions() show_versions(github=True) ```
Add `from imblearn.utils._show_versions import show_versions` to be imported ``` from imblearn import show_versions show_versions(github=True) ```
Codecov Report
@@ Coverage Diff @@
## master #557 +/- ##
==========================================
- Coverage 98.87% 98.79% -0.08%
==========================================
Files 82 84 +2
Lines 5056 5154 +98
==========================================
+ Hits 4999 5092 +93
- Misses 57 62 +5
Continue to review full report at Codecov.
|
Add `imblearn/utils/tests/test_show_versions.py` which tests for keywords in the output of `show_versions`
This looks neat. Thanks @batflyer. |
We will manage the squashing through the GitHub API |
Thanks @batflyer! Maybe we should retain for some time the old reporting of versions because it is quite common that many users haven't installed the dev version. So, we might prompt them to use the new functionality and if it is not available to report using the old way. |
@chkoar I reverted the two commits modifying I also missed including keras and tensorflow as optional dependencies. 9548b73 adds them to the output of New auto-generated system summary: System, BLAS, and DependenciesSystem Information
BLAS
Python Dependencies
|
@batflyer that's great, thanks! Do you thing that we could keep both reporting strategies without confusion? I mean: if you have this version and up do this otherwise do this? |
Having both might leave us with a chicken-and-the-egg problem (a user has to know the version of The majority of Issues will probably involve |
Ok. Merging as is and we will follow up. Thanks. |
Fixes #542: "show versions"
This pull request:
sklearn
Automatically formatting for issues
Per a comment by @glemaitre, this can surround system information with
<detail>
tags. For example, my system information output as follows:System, BLAS, and Dependencies
System Information
3.7.2 (default, Dec 29 2018, 00:00:04) [Clang 4.0.1 (tags/RELEASE_401/final)]
/Users/hayesall/anaconda3/envs/imblearn/bin/python
Darwin-17.7.0-x86_64-i386-64bit
BLAS
NO_ATLAS_INFO=3, HAVE_CBLAS=None
cblas
Python Dependencies
19.0.3
40.8.0
0.5.0.dev0
0.20.3
1.16.2
1.2.1
None
None
Multiple ways to use this functionality
I made changes in the
.github/ISSUE_TEMPLATE.md
andCONTRIBUTING.md
in order to reflect these changes.I found the following to be easiest (for copying-and-pasting):
python -c "from imblearn import show_versions; show_versions(github=True)"
But listing actual Python code would also be an option:
Screenshot depicting two use cases
Final Comments
Four commits each correspond to a specific change. If additional changes are needed prior to merging, I can squash/drop/revoke to get everything in working order.
Thank you developers!