472dbff52155c60c486d293ad0a8e6ac868eb99e,opt_einsum/tests/test_sharing.py,,test_partial_sharing,#Any#,56

Before Change


    num_exprs_nosharing = 0
    with shared_intermediates() as cache:
        expr(x, y, z1, backend=backend)
        num_exprs_nosharing += len(cache)
    with shared_intermediates() as cache:
        expr(x, y, z2, backend=backend)
        num_exprs_nosharing += len(cache)

    print("-" * 40)
    print("With sharing:")
    with shared_intermediates() as cache:

After Change



    print("-" * 40)
    print("Without sharing:")
    num_exprs_nosharing = Counter()
    with shared_intermediates() as cache:
        expr(x, y, z1, backend=backend)
        num_exprs_nosharing.update(count_cached_ops(cache))
    with shared_intermediates() as cache:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dgasmith/opt_einsum
Commit Name: 472dbff52155c60c486d293ad0a8e6ac868eb99e
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/tests/test_sharing.py
Class Name:
Method Name: test_partial_sharing


Project Name: PetrochukM/PyTorch-NLP
Commit Name: bb9335bbc981c0541e37a875d79d0ef419008574
Time: 2018-03-25
Author: petrochukm@gmail.com
File Name: torchnlp/text_encoders/subword_encoder.py
Class Name: SubwordEncoder
Method Name: __init__


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 249a1a53fe07a903d01d59fb69437c300b59461f
Time: 2016-06-18
Author: glemaitre@visor.udg.edu
File Name: unbalanced_dataset/under_sampling/instance_hardness_threshold.py
Class Name: InstanceHardnessThreshold
Method Name: transform