898e47242527e402f4d014fd084c31843d64d1b8,python/ray/test_utils.py,,run_string_as_driver_nonblocking,#Any#,117

Before Change


    // the Python process tries to run it.
    with tempfile.NamedTemporaryFile(delete=False) as f:
        f.write(driver_script.encode("ascii"))
        f.flush()
        return subprocess.Popen(
            [sys.executable, f.name],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE)

After Change


    Returns:
        A handle to the driver process.
    
    script = "; ".join([
        "import sys",
        "script = sys.stdin.read()",
        "sys.stdin.close()",
        "del sys",
        "exec(\"del script\\n\" + script)",
    ])
    proc = subprocess.Popen(
        [sys.executable, "-c", script],
        stdin=subprocess.PIPE,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ray-project/ray
Commit Name: 898e47242527e402f4d014fd084c31843d64d1b8
Time: 2020-06-27
Author: mehrdadn@users.noreply.github.com
File Name: python/ray/test_utils.py
Class Name:
Method Name: run_string_as_driver_nonblocking


Project Name: ray-project/ray
Commit Name: 4572c6cf0f6f64fff261b5c27d87f40274861e9c
Time: 2021-03-02
Author: alex@anyscale.io
File Name: python/ray/autoscaler/_private/cli_logger.py
Class Name: _CliLogger
Method Name: _print


Project Name: tensorflow/privacy
Commit Name: 267ea7f90dedcd2033d2a7774dbf5aa0913c6b92
Time: 2020-07-23
Author: shuangsong@google.com
File Name: tensorflow_privacy/privacy/membership_inference_attack/tf_estimator_evaluation.py
Class Name: MembershipInferenceTrainingHook
Method Name: end