Skip to content

Commit 1484320

Browse files
Guaranteeing an exception when the CLI tests don't work
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
1 parent 41aa312 commit 1484320

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_finetune.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ def test_finetune_multiple_backbones(model_name):
3434

3535
torch.save(filtered_state_dict, os.path.join("/tmp", model_name + ".pt"))
3636

37-
# Running the terratorch CLI
38-
command_str = f"terratorch fit -c tests/manufactured-finetune_{model_name}.yaml"
37+
try:
38+
# Running the terratorch CLI
39+
command_str = f"terratorch fit -c tests/manufactured-finetune_{model_name}.yaml"
3940

40-
subprocess.run(command_str, shell=True)
41+
subprocess.run(command_str, shell=True)
42+
except:
43+
Exception("Fine-tuning cannot be executed.")
4144

4245

0 commit comments

Comments
 (0)