Skip to content

Commit 2c417fb

Browse files
Update phishing_email_detection_gpt2.py
Test to fast forward to Cerebros NLP test and check for compatibility.
1 parent 5c58d65 commit 2c417fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

phishing_email_detection_gpt2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def rotate_half(x):
8989

9090
"""### A custom GPT2 encoder layer for text embedding"""
9191

92-
92+
"""
9393
class GPT2Layer(tf.keras.layers.Layer):
9494
9595
def __init__(self, max_seq_length, **kwargs):
@@ -187,6 +187,7 @@ def from_config(cls, config):
187187
hy_df = pd.DataFrame(history.history)
188188
print(hy_df)
189189
190+
"""
190191

191192
### Cerebros model:
192193

@@ -461,7 +462,7 @@ def call(self, x):
461462
cerebros_time_per_model = cerebros_time_all_models_min / models_tried
462463

463464
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.")
464-
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.")
465+
# 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.")
465466

466467

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

0 commit comments

Comments
 (0)