CI Metrics #522
Open
CI Metrics #522
Jenkins - ci.inria.fr / Tests / Functional tests / GPU / Transfer learning tests Linux
failed
Feb 16, 2024 in 0s
test_transfer_learning.test_transfer_learning[transfer_cnn_multicnn] failed
Send us feedback
Details
test_transfer_learning.test_transfer_learning[transfer_cnn_multicnn]
assert False
Stack trace
cmdopt = {'input': '/mnt/data/clinicadl_data_ci/data_ci'}
tmp_path = PosixPath('/local2/ci/tmp/test_transfer_learning_transfe3')
test_name = 'transfer_cnn_multicnn'
def test_transfer_learning(cmdopt, tmp_path, test_name):
base_dir = Path(cmdopt["input"])
input_dir = base_dir / "transferLearning" / "in"
ref_dir = base_dir / "transferLearning" / "ref"
tmp_out_dir = tmp_path / "transferLearning" / "out"
tmp_target_dir = tmp_path / "transferLearning" / "target"
tmp_out_dir.mkdir(parents=True)
caps_roi_path = input_dir / "caps_roi"
extract_roi_str = "t1-linear_mode-roi.json"
labels_path = input_dir / "labels_list" / "2_fold"
config_path = input_dir / "train_config.toml"
if test_name == "transfer_ae_ae":
source_task = [
"train",
"reconstruction",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_out_dir),
"-c",
str(config_path),
]
target_task = [
"train",
"reconstruction",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_target_dir),
"-c",
str(config_path),
"--transfer_path",
str(tmp_out_dir),
]
name = "aeTOae"
elif test_name == "transfer_ae_cnn":
source_task = [
"train",
"reconstruction",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_out_dir),
"-c",
str(config_path),
]
target_task = [
"train",
"classification",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_target_dir),
"-c",
str(config_path),
"--transfer_path",
str(tmp_out_dir),
]
name = "aeTOcnn"
elif test_name == "transfer_cnn_cnn":
source_task = [
"train",
"classification",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_out_dir),
"-c",
str(config_path),
]
target_task = [
"train",
"classification",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_target_dir),
"-c",
str(config_path),
"--transfer_path",
str(tmp_out_dir),
]
name = "cnnTOcnn"
elif test_name == "transfer_cnn_multicnn":
source_task = [
"train",
"classification",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_out_dir),
"-c",
str(config_path),
]
target_task = [
"train",
"classification",
str(caps_roi_path),
extract_roi_str,
str(labels_path),
str(tmp_target_dir),
"-c",
str(config_path),
"--transfer_path",
str(tmp_out_dir),
]
name = "cnnTOcnn"
else:
raise NotImplementedError(f"Test {test_name} is not implemented.")
if tmp_out_dir.exists():
shutil.rmtree(tmp_out_dir)
if tmp_target_dir.exists():
shutil.rmtree(tmp_target_dir)
flag_source = not os.system("clinicadl -vvv " + " ".join(source_task))
flag_target = not os.system("clinicadl -vvv " + " ".join(target_task))
assert flag_source
> assert flag_target
E assert False
test_transfer_learning.py:144: AssertionError
Loading