test
Browse files
run_flax_speech_recognition_seq2seq_streaming.py
CHANGED
|
@@ -754,13 +754,11 @@ def main():
|
|
| 754 |
if filename.startswith("step_"):
|
| 755 |
with open(os.path.join(predictions_folder_name, filename), "r+") as f:
|
| 756 |
content = f.read()
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
|
| 762 |
-
except:
|
| 763 |
-
print(f"Some strange stuff happened for file {filename}")
|
| 764 |
|
| 765 |
logger.info(f"Created {stats_file_name} and updated the headers of the other stats files")
|
| 766 |
|
|
|
|
| 754 |
if filename.startswith("step_"):
|
| 755 |
with open(os.path.join(predictions_folder_name, filename), "r+") as f:
|
| 756 |
content = f.read()
|
| 757 |
+
new_content = md_header + "\n\n" + content[content.index("| STEP| loss | wer"):]
|
| 758 |
+
f.seek(0)
|
| 759 |
+
f.write(new_content)
|
| 760 |
+
f.truncate()
|
| 761 |
+
|
|
|
|
|
|
|
| 762 |
|
| 763 |
logger.info(f"Created {stats_file_name} and updated the headers of the other stats files")
|
| 764 |
|
run_streaming_pere.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
python run_flax_speech_recognition_seq2seq_streaming.py \
|
| 2 |
-
--model_name_or_path openai/whisper-
|
| 3 |
--dataset_name mozilla-foundation/common_voice_11_0 \
|
| 4 |
--dataset_config nn-NO \
|
| 5 |
--text_column_name sentence \
|
|
@@ -14,8 +14,9 @@ python run_flax_speech_recognition_seq2seq_streaming.py \
|
|
| 14 |
--num_train_steps 40 \
|
| 15 |
--eval_steps 10 \
|
| 16 |
--learning_rate=2e-4 \
|
| 17 |
-
--per_device_train_batch_size=
|
| 18 |
--per_device_eval_batch_size=2 \
|
| 19 |
--predict_with_generate \
|
| 20 |
--write_predictions \
|
| 21 |
-
--streaming=True
|
|
|
|
|
|
| 1 |
python run_flax_speech_recognition_seq2seq_streaming.py \
|
| 2 |
+
--model_name_or_path openai/whisper-small.en \
|
| 3 |
--dataset_name mozilla-foundation/common_voice_11_0 \
|
| 4 |
--dataset_config nn-NO \
|
| 5 |
--text_column_name sentence \
|
|
|
|
| 14 |
--num_train_steps 40 \
|
| 15 |
--eval_steps 10 \
|
| 16 |
--learning_rate=2e-4 \
|
| 17 |
+
--per_device_train_batch_size=184 \
|
| 18 |
--per_device_eval_batch_size=2 \
|
| 19 |
--predict_with_generate \
|
| 20 |
--write_predictions \
|
| 21 |
+
--streaming=True \
|
| 22 |
+
--push_to_hub
|