19173aa4370e36cba96ee7049eaaa0dceda5007c,tools/nni_gpu_tool/gpu_metrics_collector.py,,main,#Any#,43

Before Change


    if check_ready_to_run() == False:
        // GPU metrics collector is already running. Exit
        exit(2)
    with open(os.path.join(metrics_output_dir, "gpu_metrics"), "w") as outputFile:
        pass
    os.chmod(os.path.join(metrics_output_dir, "gpu_metrics"), 0o777)
    cmd = "nvidia-smi -q -x"
    while(True):
        try:

After Change


        except Exception:
            traceback.print_exc()
            gen_empty_gpu_metric(metrics_output_dir)
            break
        parse_nvidia_smi_result(smi_output, metrics_output_dir)
        // TODO: change to sleep time configurable via arguments
        time.sleep(5)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: microsoft/nni
Commit Name: 19173aa4370e36cba96ee7049eaaa0dceda5007c
Time: 2019-08-14
Author: suiguoxin@gmail.com
File Name: tools/nni_gpu_tool/gpu_metrics_collector.py
Class Name:
Method Name: main


Project Name: NervanaSystems/coach
Commit Name: 869bd421a359309b719e3678dca56a07c9ad9726
Time: 2019-03-28
Author: 46447582+anabwan@users.noreply.github.com
File Name: rl_coach/tests/utils/test_utils.py
Class Name:
Method Name: find_string_in_logs


Project Name: microsoft/nni
Commit Name: eaf421206d42537f956f46ba2945335d060e21ea
Time: 2019-08-11
Author: suiguoxin@gmail.com
File Name: tools/nni_gpu_tool/gpu_metrics_collector.py
Class Name:
Method Name: main