b2e3c2471d140ea4f03f40d0c64f2c63610023c9,backend/server.py,,ParseEventFilesSpec,#Any#,48

Before Change


    return files
  for specification in logdir.split(","):
    // If it"s a gcs or hdfs path, don"t split on colon
    if (io_wrapper.IsGCSPath(specification) or
        specification.startswith("hdfs://")):
      run_name = None
      path = specification
    // If the spec looks like /foo:bar/baz, then we assume it"s a path with a
    // colon.
    elif ":" in specification and specification[0] != "/":
      // We split at most once so run_name:/path:with/a/colon will work.
      run_name, _, path = specification.partition(":")
    else:
      run_name = None
      path = specification
    if not (io_wrapper.IsGCSPath(path) or path.startswith("hdfs://")):
      path = os.path.realpath(path)
    files[path] = run_name
  return files

After Change


  if logdir is None:
    return files
  // Make sure keeping consistent with ParseURI in core/lib/io/path.cc
  uri_pattern = re.compile("[a-zA-Z][0-9a-zA-Z.]://.*")
  for specification in logdir.split(","):
    // Check if the spec contains group. A spec start with xyz:// is regarded as
    // URI path spec instead of group spec. If the spec looks like /foo:bar/baz,
    // then we assume it"s a path with a colon.
    if uri_pattern.match(specification) is None and \
       ":" in specification and specification[0] != "/":
      // We split at most once so run_name:/path:with/a/colon will work.
      run_name, _, path = specification.partition(":")
    else:
      run_name = None
      path = specification
    if uri_pattern.match(path) is None:
      path = os.path.realpath(path)
    files[path] = run_name
  return files
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/tensorboard
Commit Name: b2e3c2471d140ea4f03f40d0c64f2c63610023c9
Time: 2016-11-04
Author: lliang.he@gmail.com
File Name: backend/server.py
Class Name:
Method Name: ParseEventFilesSpec


Project Name: tensorflow/tensorboard
Commit Name: 1329a9243a164e33f6e5b5e40c9e1ed98a798804
Time: 2016-11-09
Author: bsteiner@google.com
File Name: backend/server.py
Class Name:
Method Name: ParseEventFilesSpec


Project Name: osmr/imgclsmob
Commit Name: 7cda122d9636cdfe8dab5c745b3fa4d30ab57cc9
Time: 2018-12-11
Author: osemery@gmail.com
File Name: gluon/utils.py
Class Name:
Method Name: prepare_model