Skip to content

Commit 9e443f3

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
Fix misspelled variable, fix wrong data type for perplexity.
1 parent 7adfc50 commit 9e443f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generative-proof-of-concept-CPU-preprocessing-in-memory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ def complete_text_beam(text: str,
10851085
# test_text_block = "I saw the sun and it was as shining on the"
10861086
# response = complete_text_greedy(test_text_block)
10871087
# print(f"I ask the generator (greedy): {test_text_block}... It responds: '{response}'.")
1088-
# response = complete_text_beam(test_text_blcok)
1088+
# response = complete_text_beam(test_text_block)
10891089
# print(f"I ask the generator (Beam defaults - max_new_tokens: 10, temperature: 0.75, top_k: 75, top_p: 0.98, repetition_penalty: None, presence_penalty: 1.3, frequency_penalty: 1.4): {test_text_block}... It responds: '{response}'.")
10901090

10911091
trial_number = int(trial.number)
@@ -1418,7 +1418,7 @@ def create_dataset(raw_text_samples, tokenizer, sample_expansion_batch_size=10)
14181418
pd.DataFrame(phase_i_b_history.history)
14191419
# To Do: Find best metric: Reference: cerebros/simplecerebrosrandomsearch/simple_cerebros_random_search.py: Line ~ 590
14201420
# = phase_i_b_history.
1421-
result_phase_i_b = int(phase_i_b_history['perplexity'].min())
1421+
result_phase_i_b = float(phase_i_b_history['perplexity'].min())
14221422
mlflow.log_metric("phase_i_b-perplexity", result_phase_i_b, step=trial_number)
14231423

14241424
# Text samples after Phase I-b training

0 commit comments

Comments
 (0)