5b2fa49f9ee24bd079ab0c8d5373a3bfcfcc60b4,tensorflow_transform/tf_metadata/v1_json/schema_io_v1_json_writer.py,,_to_domain,#Any#,134

Before Change


    return {"floats": {}}
  if dtype == tf.string:
    return {"strings": {}}
  if dtype == tf.bool:
    return {"bools": {}}
  return {}


def _get_tf_options(representation, type_string):

After Change


  Translates a Domain object into a JSON dict.
  result = {}
  // Domain names and bounds are not populated yet
  if isinstance(domain, dataset_schema.IntDomain):
    result["ints"] = {
        "min": str(domain.min_value),
        "max": str(domain.max_value),
        "isCategorical": domain.is_categorical
    }
  elif isinstance(domain, dataset_schema.FloatDomain):
    result["floats"] = {}
  elif isinstance(domain, dataset_schema.StringDomain):
    result["strings"] = {}
  elif isinstance(domain, dataset_schema.BoolDomain):
    result["bools"] = {}
  return result


def _get_tf_options(representation, type_string):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: tensorflow/transform
Commit Name: 5b2fa49f9ee24bd079ab0c8d5373a3bfcfcc60b4
Time: 2017-03-07
Author: no-reply@google.com
File Name: tensorflow_transform/tf_metadata/v1_json/schema_io_v1_json_writer.py
Class Name:
Method Name: _to_domain


Project Name: has2k1/plotnine
Commit Name: 565bfe890fa85b433bf1be04189212000b3cd327
Time: 2016-04-13
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom.py
Class Name: geom
Method Name: _make_stat


Project Name: Microsoft/nni
Commit Name: b7366b685afdde156e551f8ba5008857f789e368
Time: 2019-02-11
Author: 871886504@qq.com
File Name: tools/nni_annotation/code_generator.py
Class Name:
Method Name: test_variable_equal