9bc517732374321e907a16a1f9ea2674a8251589,tools/make_transforms_docs.py,,,#,159

Before Change


    command = args.command
    if command not in {"make", "check"}:
        raise ValueError(
            "You should provide a valid command: {{make|check}}. Got {command} instead.".format(command=command)
        )
    transforms_info = get_transforms_info()
    image_only_transforms = {transform: info for transform, info in transforms_info.items() if info["image_only"]}
    dual_transforms = {transform: info for transform, info in transforms_info.items() if not info["image_only"]}
    image_only_transforms_links = make_transforms_targets_links(image_only_transforms)
    dual_transforms_table = make_transforms_targets_table(
        dual_transforms, header=["Transform"] + [target.value for target in Targets]
    )
    if command == "make":
        print(image_only_transforms_links)
        print(dual_transforms_table)
    else:
        check_docs(args.filepath, image_only_transforms_links, dual_transforms_table)

After Change


        check_docs(args.filepath, image_only_transforms_links, dual_transforms_table)


if __name__ == "__main__":
    main()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: albu/albumentations
Commit Name: 9bc517732374321e907a16a1f9ea2674a8251589
Time: 2020-05-01
Author: dipetm@gmail.com
File Name: tools/make_transforms_docs.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: ca907342507c1139696f542de0a3351d7a382eee
Time: 2017-12-04
Author: sgross@fb.com
File Name: reinforcement_learning/actor_critic.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: ca907342507c1139696f542de0a3351d7a382eee
Time: 2017-12-04
Author: sgross@fb.com
File Name: reinforcement_learning/reinforce.py
Class Name:
Method Name: