soweego
soweego copied to clipboard
Handle warnings from third-party libraries
These warnings are duplicate: both logged and printed to stderr.
logging.captureWarnings(True) seems to be enabled by default.
See https://docs.python.org/3.7/library/warnings.html#temporarily-suppressing-warnings
General
Update: this has been fixed in 6567781
- [x] Silence
Using TensorFlow backend.: it gets printed wheneverkerasis imported.
Importer
- [x] To hit:
python -m soweego importer import TARGET
WARNING: /usr/local/lib/python3.7/site-packages/pymysql/cursors.py:170: Warning: (124, 'InnoDB rebuilding table to add column FTS_DOC_ID')
result = self._query(query)
Feature extraction
The following warnings are emitted during feature extraction, i.e., linker/workflow#extract_features.
- [x] ~~Silence
FutureWarningfromrecordlinkage:~~ not hitting this anymore withrecordlinkage0.13
WARNING: /Users/focs/.local/share/virtualenvs/soweego-jENbvpMi/lib/python3.7/site-packages/recordlinkage/index.py:155: FutureWarning: the 'labels' keyword is deprecated, use 'codes' instead
verify_integrity=False)
- [ ] silence the following
RunTimeWarning, a recordlinkage known open issue: https://github.com/J535D165/recordlinkage/issues/56 UPDATE: the issue is now claimed to be closed inrecordlinkage0.13, but we are hitting it anyway
WARNING: /Users/focs/soweego/soweego/linker/feature_extraction.py:122: RuntimeWarning: invalid value encountered in true_divide
cosine = numpy.divide(ab, numpy.multiply(a, b)).A1
- [x] ~~investigate this, happens when using Naïve Bayes:~~ not hitting this anymore
WARNING: /Users/focs/.local/share/virtualenvs/soweego-jENbvpMi/lib/python3.7/site-packages/recordlinkage/algorithms/nb_sklearn.py:324: RuntimeWarning: divide by zero encountered in log
self.class_log_prior_ = (np.log(self.class_count_) -
Neural network training
Update: both of these messages were silenced in 3a971d95e4a7e6c1387806a899a01cbb08d7f4c2
- [x] To hit:
python -m soweego linker evaluate slp TARGET ENTITYandpython -m soweego linker train slp TARGET ENTITY.
WARNING:tensorflow:From /usr/local/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
- [x] to hit:
python -m soweego linker train slp TARGET ENTITY
WARNING:tensorflow:From /usr/local/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Grid search
- [ ] To hit:
python -m soweego linker evaluate svm TARGET ENTITY --nested
WARNING: /usr/local/lib/python3.7/site-packages/sklearn/svm/base.py:196: FutureWarning: The default value of gamma will change from 'auto' to 'scale' in version 0.22 to account better for unscaled features. Set gamma explicitly to 'auto' or 'scale' to avoid this warning.
"avoid this warning.", FutureWarning)
- [ ] to hit:
python -m soweego linker evaluate lsvm TARGET ENTITY --nested
WARNING: /usr/local/lib/python3.7/site-packages/sklearn/svm/base.py:931: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
"the number of iterations.", ConvergenceWarning)
MLens
- [x]
[MLENS] backend: threadingseems to get printed whenevermlensis imported. For instance, withpython -m soweego. See http://ml-ensemble.com/docs/config.html for an eventual solution.
See https://github.com/J535D165/recordlinkage/pull/86