af898ca25b22e6f388e7fe493ce78e5f5e026d72,tests/test_new.py,,test_new,#Any#,4
Before Change
assert exit_status == 0
os.chdir(os.path.join(tmpdir, "myproject.bootstrap.pytorch"))
exit_status = os.system("python -m bootstrap.run -o myproject/options/myproject.yaml --exp.dir logs/myproject/1_exp --misc.cuda False --engine.nb_epochs 10")
assert exit_status == 0
fnames = [
"ckpt_best_accuracy_engine.pth.tar",
After Change
def test_new(tmpdir):
new_project("MyProject", tmpdir)
base_dir = os.path.join(tmpdir, "myproject.bootstrap.pytorch")
test_dir = os.path.join(base_dir, "myproject")
options_file = os.path.join(test_dir, "options/myproject.yaml")
sys.path.insert(0, base_dir)
run(options_file, run_parser=False)
fnames = [
"ckpt_best_accuracy_engine.pth.tar",
"ckpt_best_loss_optimizer.pth.tar",
"logs.txt",
"ckpt_best_accuracy_model.pth.tar",
"ckpt_last_engine.pth.tar",
"options.yaml",
"ckpt_best_accuracy_optimizer.pth.tar",
"ckpt_last_model.pth.tar",
"view.html",
"ckpt_best_loss_engine.pth.tar",
"ckpt_last_optimizer.pth.tar",
"ckpt_best_loss_model.pth.tar",
"logs.json"
]
for fname in fnames:
file_path = os.path.join(test_dir, f"logs/myproject/1_exp/{fname}")
assert os.path.isfile(file_path)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: Cadene/bootstrap.pytorch
Commit Name: af898ca25b22e6f388e7fe493ce78e5f5e026d72
Time: 2020-05-17
Author: mcoaky@gmail.com
File Name: tests/test_new.py
Class Name:
Method Name: test_new
Project Name: deepchem/deepchem
Commit Name: b6580cf7fae50ad9b954e2bde45cca7883fff2d3
Time: 2017-02-19
Author: zqwu@sherlock-ln03.stanford.edu
File Name: examples/qm7/qm7_datasets.py
Class Name:
Method Name: load_qm7b_from_mat
Project Name: deepchem/deepchem
Commit Name: b6580cf7fae50ad9b954e2bde45cca7883fff2d3
Time: 2017-02-19
Author: zqwu@sherlock-ln03.stanford.edu
File Name: examples/qm7/qm7_datasets.py
Class Name:
Method Name: load_qm7_from_mat
Project Name: Cadene/bootstrap.pytorch
Commit Name: af898ca25b22e6f388e7fe493ce78e5f5e026d72
Time: 2020-05-17
Author: mcoaky@gmail.com
File Name: tests/test_new.py
Class Name:
Method Name: test_new