225d31587eeb9aca226158e346c8e9730777913c,perfkitbenchmarker/publisher.py,,RepublishJSONSamples,#Any#,763

Before Change


        samples.append(raw_dict)
      except Exception as e:
        logging.info("Exception processing sample %s", line)
        logging.info("Exception was: %s", e)
        raise e

  // We can"t use a SampleCollector because SampleCollector.AddSamples depends on
  // having a benchmark and a benchmark_spec.

After Change


    samples = [json.loads(s) for s in file if s]
  for sample in samples:
    // Chop "|" at the beginning and end of labels and split labels by "|,|"
    fields = sample.pop("labels")[1:-1].split("|,|")
    // Turn the fields into [[key, value], ...]
    key_values = [field.split(":", 1) for field in fields]
    sample["metadata"] = {k: v for k, v in key_values}

  // We can"t use a SampleCollector because SampleCollector.AddSamples depends on
  // having a benchmark and a benchmark_spec.
  publishers = SampleCollector._PublishersFromFlags()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 225d31587eeb9aca226158e346c8e9730777913c
Time: 2017-02-24
Author: nlavine@google.com
File Name: perfkitbenchmarker/publisher.py
Class Name:
Method Name: RepublishJSONSamples


Project Name: kubeflow/kubeflow
Commit Name: 8fcd7448ea2c700246f3de3bbdd2b2cbca7a9cdf
Time: 2018-04-26
Author: jose5918@gmail.com
File Name: testing/test_deploy.py
Class Name:
Method Name: setup_kubeflow_ks_app


Project Name: PaddlePaddle/edl
Commit Name: 667d856a2fc27732d745cd7d926e9739ad12995c
Time: 2019-09-28
Author: wangjiawei04@baidu.com
File Name: example/ctr/ctr/train.py
Class Name:
Method Name: train