apeforest commented on a change in pull request #15499: Improve diagnose.py, adding build features info and binary library path. URL: https://github.com/apache/incubator-mxnet/pull/15499#discussion_r303192850
########## File path: tools/diagnose.py ########## @@ -105,13 +110,20 @@ def check_mxnet(): mx_dir = os.path.dirname(mxnet.__file__) print('Directory :', mx_dir) commit_hash = os.path.join(mx_dir, 'COMMIT_HASH') - with open(commit_hash, 'r') as f: - ch = f.read().strip() - print('Commit Hash :', ch) + if os.path.exists(commit_hash): + with open(commit_hash, 'r') as f: + ch = f.read().strip() + print('Commit Hash :', ch) + else: + print('Commit hash file "{}" not found. Not installed from pre-built package or built from source.'.format(commit_hash)) + print('Library :', mxnet.libinfo.find_lib_path()) + try: + print('Build features:') + print(get_build_features_str()) Review comment: This will fail if user use this script to diagnose an mxnet script before 1.5.0 release. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services