aeb516494daa207720b428072ab49eeea7bfff75,scripts/tests/test_scripts.py,,test_sampling,#Any#,115
Before Change
if method == "beam_search":
args.append("--use-beam-search")
if method == "sampling":
args.extend(["--use-sampling", "--temperature", "1.0"])
process = subprocess.check_call([sys.executable, "./scripts/text_generation/sequence_sampling.py"]
+ args)
time.sleep(5)
After Change
def test_sampling(method):
args = ["--bos", "I love it", "--beam-size", "2", "--print-num", "1", "--gpu", "0"]
if method == "beam_search":
args.insert(0, "beam-search")
args.extend(["--k", "50"])
if method == "sampling":
args.insert(0, "random-sample")
args.extend(["--temperature", "1.0"])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: dmlc/gluon-nlp
Commit Name: aeb516494daa207720b428072ab49eeea7bfff75
Time: 2019-06-13
Author: xshiab@ust.hk
File Name: scripts/tests/test_scripts.py
Class Name:
Method Name: test_sampling
Project Name: GPflow/GPflow
Commit Name: 046b107d82c3042727aa7e0e138963200b742e46
Time: 2019-11-13
Author: 6815729+condnsdmatters@users.noreply.github.com
File Name: doc/source/conf.py
Class Name:
Method Name:
Project Name: microsoft/nni
Commit Name: 875a0da84c4a7e02e49bc863665e486baf520510
Time: 2019-08-05
Author: 871886504@qq.com
File Name: tools/nni_annotation/code_generator.py
Class Name: Transformer
Method Name: _visit_string