Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: lsst_ci, validate_drp
-
Labels:None
-
Team:External
Description
Testing bin/deploy -b with DM-15385, DM-15419, DM-15394, DM-15389, and DM-15443 (Python 3.7.0, numpy 1.15.0, and astropy 3.0.4) I get the following error from lsst_ci:
[2018-08-18T00:45:21.894199Z] Traceback (most recent call last):
|
[2018-08-18T00:45:21.894202Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/stack/DarwinX86/validate_drp/16.0-9-gf51232b+1/bin/validateDrp.py", line 104, in <module>
|
[2018-08-18T00:45:21.894204Z] validate.run(args.repo, **kwargs)
|
[2018-08-18T00:45:21.894206Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/stack/DarwinX86/validate_drp/16.0-9-gf51232b+1/python/lsst/validate/drp/validate.py", line 152, in run
|
[2018-08-18T00:45:21.894208Z] metrics_package=metrics_package, **kwargs)
|
[2018-08-18T00:45:21.894210Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/stack/DarwinX86/validate_drp/16.0-9-gf51232b+1/python/lsst/validate/drp/validate.py", line 243, in runOneRepo
|
[2018-08-18T00:45:21.894212Z] metrics_package=metrics_package, **kwargs)
|
[2018-08-18T00:45:21.894214Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/stack/DarwinX86/validate_drp/16.0-9-gf51232b+1/python/lsst/validate/drp/validate.py", line 350, in runOneFilter
|
[2018-08-18T00:45:21.894216Z] pa2 = measurePA2(metrics[pa2_spec.metric_name], pa1, pf1_spec.threshold)
|
[2018-08-18T00:45:21.894218Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/stack/DarwinX86/validate_drp/16.0-9-gf51232b+1/python/lsst/validate/drp/calcsrd/pa2.py", line 62, in measurePA2
|
[2018-08-18T00:45:21.894220Z] return Measurement(metric, np.percentile(np.abs(magDiffs), pf1Percentile) * magDiffs.unit,
|
[2018-08-18T00:45:21.894222Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/miniconda/envs/lsst-scipipe/lib/python3.7/site-packages/numpy/lib/function_base.py", line 3540, in percentile
|
[2018-08-18T00:45:21.894224Z] a, q, axis, out, overwrite_input, interpolation, keepdims)
|
[2018-08-18T00:45:21.894226Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/miniconda/envs/lsst-scipipe/lib/python3.7/site-packages/numpy/lib/function_base.py", line 3652, in _quantile_unchecked
|
[2018-08-18T00:45:21.894229Z] interpolation=interpolation)
|
[2018-08-18T00:45:21.894231Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/miniconda/envs/lsst-scipipe/lib/python3.7/site-packages/numpy/lib/function_base.py", line 3250, in _ureduce
|
[2018-08-18T00:45:21.894233Z] r = func(a, **kwargs)
|
[2018-08-18T00:45:21.894235Z] File "/Volumes/ExternalSSD/Users/timj/work/lsstsw37/miniconda/envs/lsst-scipipe/lib/python3.7/site-packages/numpy/lib/function_base.py", line 3754, in _quantile_ureduce_func
|
[2018-08-18T00:45:21.894237Z] ap.partition(concatenate((indices_below, indices_above)), axis=axis)
|
[2018-08-18T00:45:21.894239Z] TypeError: Partition index must be integer
|
[2018-08-18T00:45:21.894241Z] ===================== 2 failed, 1 passed in 409.12 seconds =====================
|
The fix is to edit lsst.validate.drp.calcsrd.measurePA2 to cast pf1Percentile to a float before calling np.percentile. I have built this without problem with numpy1.14.5, astropy3.0.3 and python 3.6.6.
The problem is numpy 1.15. Using python 3.6.6, astropy 3.0.4 and numpy 1.15 also fails in the same way.
Attachments
Issue Links
- relates to
-
DM-16289 validate_drp seems to fail on Python 3.7
- Invalid