Skip to content

Commit d88b3dc

Browse files
Update regression-example-ames-no-preproc.py
Add better CICD test for negative case for purge_model_storage_files.
1 parent 2f23de9 commit d88b3dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

regression-example-ames-no-preproc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,13 @@
125125
print(best_model_found.summary())
126126

127127
# Validate that purge_model_storage is NOT active by default
128+
128129
model_storage_path = f"{PROJECT_NAME}/models"
129130
assert exists(model_storage_path)
130131
num_items = len(listdir(model_storage_path))
131-
print(f"There are {num_items} in {model_storage_path}")
132-
assert num_items > 0
132+
print(f"There are {num_items} items in {model_storage_path}.")
133+
if num_items <= 0:
134+
raise ValueError(f"Failed test: {model_storage_path} was deleted and should not have been.")
133135

134136
print("result extracted from cerebros")
135137
print(f"Final result was (val_root_mean_squared_error): {result}")

0 commit comments

Comments
 (0)