Showing 1 of 1 files from the diff.

@@ -1,3 +1,4 @@
Loading
1 +
import logging
1 2
from collections import defaultdict
2 3
from typing import DefaultDict, Dict, List, Tuple
3 4
@@ -104,6 +105,10 @@
Loading
104 105
            "Number of rows in x does not match number of elements in at least one label list"
105 106
        )
106 107
    buckets = get_label_buckets(*y)
107 -
    indices = buckets[bucket]
108 +
    try:
109 +
        indices = buckets[bucket]
110 +
    except KeyError:
111 +
        logging.warning("Bucket" + str(bucket) + " does not exist.")
112 +
        return np.array([])
108 113
    instances = x[indices]
109 114
    return instances
Files Coverage
snorkel 96.89%
Project Totals (68 files) 96.89%
342.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=coverage,doctest,type,check
342.2
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=coverage,doctest,type,check
1
coverage:
2
  status:
3
    project:
4
      default:
5
        target: 95%
6
    patch:
7
      default:
8
        threshold: 2%
9

10
comment:
11
  layout: "header, diff, flags, files"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading