Skip to content

Commit 016c559

Browse files
Update simple_cerebros_random_search.py
Naming reference error ....
1 parent 81d991c commit 016c559

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cerebros/simplecerebrosrandomsearch/simple_cerebros_random_search.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,14 +621,14 @@ def purge_models_except_best_model(self) -> None:
621621
files_str = [str(p) for p in files_path_obj]
622622
print("Files in model cache:")
623623
for file in files_str:
624-
file_path = f"{model_cache_path}/{file}"
624+
model_file_path = f"{model_cache_path}/{file}"
625625
print(f" {model_file_path}")
626-
if file_path != self.best_model_path:
627-
print(f"Removing: {file_path}")
628-
os.remove(file_path)
626+
if model_file_path != self.best_model_path:
627+
print(f"Removing: {model_file_path}")
628+
os.remove(model_file_path)
629629
# Temp debug code:
630630
else:
631-
print(f"Not removing {file_path}")
631+
print(f"Not removing {model_file_path}")
632632

633633

634634
def get_best_model(self, purge_model_storage_files=0) -> tf.keras.Model:

0 commit comments

Comments
 (0)