92ea2d93abe4aa1b14c9871395e29b03080a6beb,ann_benchmarks/results.py,,load_all_results,#,42

Before Change


def load_all_results():
    import re
    //TODO(Martin) Must be adaptive to get_result_filename
    regex = r"results\/(?P<dataset>[^\/]+)\/(?P<count>\d+)\/(?P<algorithm>[^\/]+)\/(?P<distance>[^_]+)_(?P<params>.*)"
    for fn in _get_leaf_paths("results/"):
        match = re.match(regex, fn)
        if match:
            d = {}
            for k in ["count", "dataset", "distance", "algorithm"]:
                d[k] = match.group(k)
            d["count"] = int(d["count"])
            f = h5py.File(fn)
            yield d, f
            f.close()

After Change


def load_all_results():
    import re
    for fn in _get_leaf_paths("results/"):
        try:
            f = h5py.File(fn)
            yield f
            f.close()
        except:
            pass

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: erikbern/ann-benchmarks
Commit Name: 92ea2d93abe4aa1b14c9871395e29b03080a6beb
Time: 2018-02-24
Author: maau@itu.dk
File Name: ann_benchmarks/results.py
Class Name:
Method Name: load_all_results


Project Name: elfi-dev/elfi
Commit Name: eb48b9b095e2200e1f7acbc6f448ff39f88c4145
Time: 2017-07-13
Author: jarno.lintusaari@aalto.fi
File Name: elfi/model/elfi_model.py
Class Name: NodeReference
Method Name: _give_name


Project Name: has2k1/plotnine
Commit Name: 4ee8f67612e87a6ece9c939ccac64901fc712c08
Time: 2017-09-21
Author: has2k1@gmail.com
File Name: plotnine/facets/facet_grid.py
Class Name:
Method Name: parse_grid_facets


Project Name: erikbern/ann-benchmarks
Commit Name: 92ea2d93abe4aa1b14c9871395e29b03080a6beb
Time: 2018-02-24
Author: maau@itu.dk
File Name: ann_benchmarks/results.py
Class Name:
Method Name: load_all_results