Skip to content

Commit ec9a04c

Browse files
Update phishing_email_detection_gpt2.py
Make a test case for purging all but the best model.
1 parent 016c559 commit ec9a04c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

phishing_email_detection_gpt2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ def from_config(cls, config):
515515

516516

517517

518+
518519
print(f"Cerebros trained {models_tried} models FROM A COLD START in ONLY {cerebros_time_all_models_min} min. Cerebros took only {cerebros_time_per_model} minutes on average per model.")
519520
print(f"GPT2 took {gpt_time_on_one_model_min} just to FINE TUNE one PRE - TRAINED model for 3 epochs. Although this is a small scale test, this shows the advantage of scaling in ON timing VS ON**2 timing.")
520521
print(f'Cerebros best accuracy achieved is {result}')
@@ -524,7 +525,7 @@ def from_config(cls, config):
524525

525526
MODEL_FILE_NAME = "cerebros-foundation-model.keras"
526527

527-
best_model_found = cerebros_automl.get_best_model()
528+
best_model_found = cerebros_automl.get_best_model(purge_model_storage_files=1)
528529
best_model_found.save(MODEL_FILE_NAME)
529530
del(best_model_found)
530531
del(cerebros_automl)

0 commit comments

Comments
 (0)