Skip to content

Commit f683fb8

Browse files
Update phishing_email_detection_gpt2.py
Optimize NPL workflow for time's sake.
1 parent 9323f5f commit f683fb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phishing_email_detection_gpt2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def from_config(cls, config):
157157
history = gpt_baseline_model.fit(
158158
x=X_train, # Input data
159159
y=y_train, # Labels
160-
epochs=4, # Number of training iterations
160+
epochs=3, # Number of training iterations
161161
batch_size=16, # Batch size small due to GPU memory constraints
162162
validation_split=0.2, # Hold out 20% of training data for validation
163163
shuffle=True, # Shuffle data at each epoch
@@ -341,7 +341,7 @@ def from_config(cls, config):
341341
cerebros_time_per_model = cerebros_time_all_models_min / models_tried
342342

343343
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.")
344-
print(f"GPT2 took {gpt_time_on_one_model_min} just to FINE TUNE one PRE - TRAINED model. Although this is a small scale test, this shows the advantage of scaling in ON timing VS ON**2 timing.")
344+
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.")
345345

346346

347347
print(f'Cerebros best accuracy achieved is {result}')

0 commit comments

Comments
 (0)