ContinuumIO / elm

Phase I & part of Phase II of NASA SBIR - Parallel Machine Learning on Satellite Data
http://ensemble-learning-models.readthedocs.io
43 stars 27 forks source link

HDF5 Reader #67

Closed brendancol closed 7 years ago

brendancol commented 8 years ago
PeterDSteinberg commented 8 years ago

Before I added xfail on the hdf5 reader kwargs test, these were my results for running all tests locally:

py.test 
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /Users/psteinberg/Documents/elm, inifile:
plugins: rerunfailures-2.0.1
collected 388 items

elm/config/tests/test_config_simple.py ....
elm/model_selection/tests/test_evolve.py ...................
elm/pipeline/tests/test_evolve_train.py ..........................
elm/pipeline/tests/test_pipeline_scenarios.py .s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...........sxx...
elm/pipeline/tests/test_predict.py s
elm/pipeline/tests/test_train.py ...
elm/pipeline/tests/test_transform.py .............
elm/readers/tests/test_elm_store.py .........
elm/readers/tests/test_hdf4.py .....
elm/readers/tests/test_hdf5.py ...................................................................................................F
elm/readers/tests/test_netcdf.py ...
elm/readers/tests/test_readers_general.py ..
elm/readers/tests/test_tif.py ...
elm/sample_util/tests/test_change_coords.py .....
elm/sample_util/tests/test_feature_selection.py ..............
elm/sample_util/tests/test_filename_selection.py .
elm/sample_util/tests/test_geo_selection.py .x
elm/sample_util/tests/test_sample_pipeline.py ..
elm/sample_util/tests/test_sklearn_preprocessing.py ...

=================================== FAILURES ===================================
______________________________ test_reader_kwargs ______________________________

    @pytest.mark.skipif(not ELM_HAS_EXAMPLES,
                   reason='elm-data repo has not been cloned')
    def test_reader_kwargs():
        pytest.xfail('Transpose issue in hdf5 files')
        sub_dataset_names, band_specs = get_band_specs(HDF5_FILES[0])
        band_specs_kwargs = []
        for b in band_specs:
            b = attr.asdict(b)
            b['xsize'], b['ysize'] = 200, 300
            band_specs_kwargs.append(BandSpec(**b))
        meta = load_hdf5_meta(HDF5_FILES[0])
        es = load_hdf5_array(HDF5_FILES[0], meta, band_specs_kwargs)
>       for b in es.band_order:
E       assert (200, 300) == (300, 200)
E         At index 0 diff: 200 != 300
E         Use -v to get the full diff

elm/readers/tests/test_hdf5.py:88: AssertionError
======= 1 failed, 323 passed, 35 skipped, 29 xfailed in 2524.14 seconds ========

The failure showed the transpose issue we have discussed in hdf5 so an xfail was added to that test for now.

PeterDSteinberg commented 7 years ago

The latest commits remove the xfail from the hdf5 tests. Here are the results of all tests:

============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /Users/psteinberg/Documents/elm, inifile:
plugins: rerunfailures-2.0.1
collected 391 items

elm/config/tests/test_config_simple.py ....
elm/model_selection/tests/test_evolve.py ...................
elm/pipeline/tests/test_evolve_train.py ..........................
elm/pipeline/tests/test_pipeline_scenarios.py .s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...ss......sxx...s.x..ss............sxxxxss...........sxx...
elm/pipeline/tests/test_predict.py s
elm/pipeline/tests/test_train.py ...
elm/pipeline/tests/test_transform.py .............
elm/readers/tests/test_elm_store.py .........
elm/readers/tests/test_hdf4.py .....
elm/readers/tests/test_hdf5.py ....................................................................................................
elm/readers/tests/test_netcdf.py ...
elm/readers/tests/test_readers_general.py .....
elm/readers/tests/test_tif.py ...
elm/sample_util/tests/test_change_coords.py .....
elm/sample_util/tests/test_feature_selection.py ..............
elm/sample_util/tests/test_filename_selection.py .
elm/sample_util/tests/test_geo_selection.py .x
elm/sample_util/tests/test_sample_pipeline.py ..
elm/sample_util/tests/test_sklearn_preprocessing.py ...

============ 327 passed, 35 skipped, 29 xfailed in 2505.02 seconds =