8079adae33711e4886a625df3f0ae9860739f7b9,example_zoo/tools/process.py,,,#,42

Before Change



for filename in CONFIG_FILENAMES:
    with open(filename, "r") as f:
        config = yaml.load(f.read())

    org = config["org"]
    repository = config["repository"]
    requires = config.get("requires", [])
    samples = config["samples"]

    with temp_clone(org, repository) as repo:
        for sample_dict in samples:
            sample_dict["org"] = org
            sample_dict["repository"] = repository

            // inherit from repo wide requirements
            sample_dict.setdefault("requires", []).extend(requires)

            cmle_package = CMLEPackage(sample_dict, repo)

            cmle_package.generate()

After Change



if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--filter", type=str, default="", help="process only samples whose script_name contains the filter string")

    args = parser.parse_args()

    main(args)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: GoogleCloudPlatform/ml-on-gcp
Commit Name: 8079adae33711e4886a625df3f0ae9860739f7b9
Time: 2019-09-03
Author: yuhanliu@google.com
File Name: example_zoo/tools/process.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 01d70cd14b2bd9f1754b94e03c3555ec412a3845
Time: 2020-02-12
Author: rvarm1@fb.com
File Name: distributed/rpc/parameter_server/rpc_param_server.py
Class Name:
Method Name:


Project Name: cve-search/cve-search
Commit Name: 164897937e1a84b760d8b2cde1555964491a55dd
Time: 2013-12-20
Author: a@foo.be
File Name: db_dump.py
Class Name:
Method Name: