Numpy "bool_" Type seeping down to d3m core library during call to to_json_structure() in Pipeline

When constructing a pipeline in memory and then calling the .to_json_structure() method on the Pipeline object we see the following exception:

/src/d3m/d3m/metadata/pipeline.py:1942: in to_json_structure
    pipeline_description = self._to_json_structure(nest_subpipelines=nest_subpipelines)
/src/d3m/d3m/metadata/pipeline.py:1934: in _to_json_structure
    pipeline_description['digest'] = utils.compute_digest(self._canonical_pipeline_description(pipeline_description))
/src/d3m/d3m/utils.py:1105: in compute_digest
    to_digest = json.dumps(normalize_numbers(obj), sort_keys=True)
/src/d3m/d3m/utils.py:640: in normalize_numbers
    return json.loads(json.dumps(obj), parse_int=float)
/usr/lib/python3.6/json/__init__.py:231: in dumps
    return _default_encoder.encode(obj)
/usr/lib/python3.6/json/encoder.py:199: in encode
    chunks = self.iterencode(o, _one_shot=True)
/usr/lib/python3.6/json/encoder.py:257: in iterencode
    return _iterencode(o, 0)
        raise TypeError("Object of type '%s' is not JSON serializable" %
>                       o.__class__.__name__)
E       TypeError: Object of type 'bool_' is not JSON serializable

/usr/lib/python3.6/json/encoder.py:180: TypeError

Thsi si caused by a numpy bool_ not being understood by the json serializer. One solutions is to add a converter to the normalize_numbers method in the d3m.utils module:

def normalize_numbers(obj: typing.Dict) -> typing.Dict:
    # Json serializer doesn't know what to do with bool_
    def default(o):
        if isinstance(o, numpy.bool_):
            return bool(o)
        print("Can't serialize %s of type %s" % (o, type(o)))
        raise TypeError
    return json.loads(json.dumps(obj, default=default), parse_int=float)

@mitar suggested we should be able to catch and deal with this at a higher level in the stack though. Thoughts?