e7202d5b855714c2ef2b45c74b7258e7c7ac233e,qcengine/compute.py,,compute,#Any#Any#Any#Any#Any#,25

Before Change



        output_data = input_data.copy()  // Initial in case of error handling
        try:
            output_data = get_program(program).compute(input_data, config)
        except KeyError as e:
            output_data = FailedOperation(
                input_data=output_data.dict(),
                success=False,

After Change


    // Build the model and validate
    input_data = model_wrapper(input_data, ResultInput)
    error = _process_failure_and_return(input_data, return_dict, raise_error)
    if error:
        return error

    // Grab the executor and build the input model
    executor = get_program(program)

    // Build out local options
    if local_options is None:
        local_options = {}

    input_engine_options = input_data.extras.pop("_qcengine_local_config", {})

    local_options = {**local_options, **input_engine_options}
    config = get_config(local_options=local_options)

    // Run the program
    with compute_wrapper(capture_output=False) as metadata:

        output_data = input_data.copy()  // lgtm [py/multiple-definition]
        output_data = executor.compute(input_data, config)

    return handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: MolSSI/QCEngine
Commit Name: e7202d5b855714c2ef2b45c74b7258e7c7ac233e
Time: 2019-03-07
Author: malorian@me.com
File Name: qcengine/compute.py
Class Name:
Method Name: compute


Project Name: hyperspy/hyperspy
Commit Name: 86735b76b816ed13e471b4cc3310e9f27bd7778d
Time: 2018-04-19
Author: frandelapena@gmail.com
File Name: hyperspy/_signals/lazy.py
Class Name: LazySignal
Method Name: decomposition


Project Name: scikit-image/scikit-image
Commit Name: ef78faf04435717a1b5797bc1a02c73d9b5e8e7f
Time: 2018-05-30
Author: jakirkham@gmail.com
File Name: skimage/util/apply_parallel.py
Class Name:
Method Name: apply_parallel