8ae70fc5866ac29542aa1681c712f4a6ff5dec88,onnxmltools/utils/main.py,,save_text,#,70

Before Change


        from onnxmltools.utils import save_text
        save_text(onnx_model,"SqueezeNet.json")
    
    try:
        with open(file_path, "w") as f:
            f.write(str(model))
    except IOError:
        print("Could not save file")


def set_model_domain(model, domain):
    
    Sets the domain on the ONNX model.

After Change


        from onnxmltools.utils import save_text
        save_text(onnx_model,"SqueezeNet.json")
    
    if model is None or not isinstance(model, onnx_proto.ModelProto):
        raise ValueError("Model is not a valid ONNX model.")
    with open(file_path, "w") as f:
        f.write(str(model))

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: onnx/onnxmltools
Commit Name: 8ae70fc5866ac29542aa1681c712f4a6ff5dec88
Time: 2019-02-19
Author: vinitras@gmail.com
File Name: onnxmltools/utils/main.py
Class Name:
Method Name: save_text


Project Name: onnx/onnxmltools
Commit Name: 8ae70fc5866ac29542aa1681c712f4a6ff5dec88
Time: 2019-02-19
Author: vinitras@gmail.com
File Name: onnxmltools/utils/main.py
Class Name:
Method Name: save_model


Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__