6d6c71ed66583c6fb9dfc31415795fdc9d455375,tests/test_model.py,,test_basic,#,12

Before Change


    model.update({1: {1: 1, 3: -5}, 2: {2: 4, 3: 5}}.items())
    assert model([(0, 1), (0, 1), (2, 1)])[0] == 0
    assert model([(0, 1), (0, 1), (2, 1)])[1] == 0
    assert model([(0, 1), (0, 1), (2, 1)])[2] > 0
    assert model([(0, 1), (1, 1), (0, 1)])[1] > 0
    assert model([(0, 1), (0, 1), (0, 1), (3, 1)])[1] < 0 
    assert model([(0, 1), (0, 1), (0, 1), (3, 1)])[2] > 0 

After Change


    model(eg)
    assert eg.scores[1] < 0 
    eg = Example.from_feats(3, [(0, 1), (0, 1), (0, 1), (3, 1)])
    model(eg)
    assert eg.scores[2] > 0 

@pytest.fixture
def instances():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: 6d6c71ed66583c6fb9dfc31415795fdc9d455375
Time: 2015-11-04
Author: honnibal@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_basic


Project Name: tensorflow/cleverhans
Commit Name: a2ad052b5a99d02de2ea439f0baa99a7f8c295e3
Time: 2017-03-29
Author: ngp5056@cse.psu.edu
File Name: tutorials/mnist_tutorial_th.py
Class Name:
Method Name: main


Project Name: tensorflow/cleverhans
Commit Name: f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12
Time: 2017-03-29
Author: ngp5056@cse.psu.edu
File Name: tutorials/mnist_tutorial_tf.py
Class Name:
Method Name: main


Project Name: facebookresearch/pythia
Commit Name: d8f9592b209e368e4934b6b429443c2a8673de3f
Time: 2020-10-19
Author: junchen20@fb.com
File Name: tests/models/test_mmbt.py
Class Name: TestMMBTTorchscript
Method Name: test_finetune_model


Project Name: keras-team/autokeras
Commit Name: 21994919156aac15558f77555538346fb702bcbc
Time: 2018-11-26
Author: jhfjhfj1@gmail.com
File Name: tests/nn/test_graph.py
Class Name:
Method Name: test_long_transform